#include <iostream>
#include <string>
#include <cmath>

using namespace std;

int main() {
    string s_max;
    string s_min;

    cout << "Enter in a minimum (INT) value:" << endl;
    cin >> s_min;

    cout << "Enter a maximum (INT) value:" << endl;
    cin >> s_max;
    
    int r_max;
    int r_min;

    try {
        r_max = stoi(s_max);
        r_min = stoi(s_min);
    } catch(const invalid_argument& e) {
        cerr << "Invalid input";

        return 1;
    }
    
    int RANDOM = rand() % r_max + r_min;
    
    for (int i = 0; i > RANDOM; i++)
        cout << i;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: