New course! Every coder should learn Generative AI!
Try a free lesson0
How can i generate a random number?
what can I use to do so?
1 Answer
+ 2
#include <iostream>
#include <random>
#include <time.h>
using namespace std;
int main() {
srand(time(0));
cout << rand();
}