#include<iostream> #include<cstdlib> using namespace std; int main() { // Providing a seed value srand((unsigned)time(NULL)); // Get a random number int random = 1 + (rand() % 10); // Print the random number cout << random << endl; return 1; }
return
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)