#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
int main()
{
srand(time(0));
int x = RAND()%100+1;
cout<<x<<endl;
return 0;
}
//this function returns a random number
#include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
int main()
{
srand(time(0));
int x = RAND()%100+1;
cout<<x<<endl;
return 0;
}
//this function returns a random number
It's "rand" not "RAND"
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
cheers