I used the function rand(), of the library <cstdlib>, to generate a random number and everytime I run it it returns 41.
1 2 3 4 5 6 7 8 9
|
#include<iostream>
#include<cstdlib>
using namespace std;
int main(){
cout<<rand();
return 0;
}
|
What's the problem?
Post scriptum: I have now run it on an online compiler and it always returns 1804289383.
Last edited on
Thank you JLBorges, it worked.