Write a program which display a number between 10 to 100 randomly.

Source Code

#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;
}


Output

SAMPLE RUN # 1

The randomly selected number is : 34

SAMPLE RUN # 2

The randomly selected number is : 45

SAMPLE RUN # 3

The randomly selected number is : 76