Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

To generate Random Number

using c++
#include <iostream>
#include <cstdlib>

using namespace std;

int main ()
{
int n, t, c;

cout << "Enter the number of random numbers you want" << endl;
cin >> n;

cout << "Random numbers are:" << endl;

for (c = 1; c <= n; c++)


{
t = random();
cout << t << endl;
}

return 0;
}

You might also like