123456789
#include<iostream> #include<stdlib.h> using namespace std; int main(){ int x=rand(); int y=srand(time(0)); cout<<x<<endl<<y; return0; }
123456789101112131415
#include <iostream> #include <cstdlib> using namespace std; int main() { srand (time(NULL)); int x = rand(); cout << x << endl; return 0; }
#include <ctime>
1234
#include <cstdlib> #include <ctime> srand(time(0)); int r = rand() % (20 - 10) + 10;