diff --git a/Generate Random Number b/Generate Random Number new file mode 100644 index 0000000..537f242 --- /dev/null +++ b/Generate Random Number @@ -0,0 +1,19 @@ +#include +#include +#include +using namespace std; + +int main() { + int n, random; + cout << "Enter number of random numbers\n"; + cin >> n; + + // print n random numbers using rand function + cout << "Random numbers between 0 to 1000\n"; + while(n--){ + random = rand()%1000 + 1; + cout << random << " "; + } + + return 0; +}