How do I create a program that generates ten random numbers from 1 -> RAND_MAX
?
RAND_MAX
must be a number input by the user.
#include <iostream>
#include <stdlib.h>
int main()
{
using namespace std;
int x;
int y;
Random:
{
x = rand();
cout << x << endl;
}
y = y + 1;
if (y == 10) {
return 0;
}
goto Random;
}