Random Number
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
int x;
cout << time(0); //IMPORTANT
srand(123);
for(x; x<30; x++){
cout << (rand()%31)+15 << endl; //IMPORTANT
}
}
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
int x;
cout << time(0); //IMPORTANT
srand(123);
for(x; x<30; x++){
cout << (rand()%31)+15 << endl; //IMPORTANT
}
}
Comments
Post a Comment