C++ program which display Random Number between 10 to 100

Source Code:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#include<iostream>
#include<cstdlib>
#include <ctime>
using namespace std;

int main()
{
 int n;
 srand(time(0));
 n = rand() % 91 + 10;
 cout<<"The randomly selected number is :"<<n;
 
 return 0;
}

Post a Comment

 
Top