its a random number generator
#include <iostream.h>
#include <stdlib.h>
#include <time.h>
#include <iomanip.h>
using namespace std;
int main ()
{
const int MAX_RANGE = 100;
int value;
int random = rand( );
int num = ((random % 100) + 1);
int quit;
do
{
srand (time (NULL));
value = rand() % MAX_RANGE + 1;
cout << value<<endl;
cout << "Enter 0 to end program: ";
cout << "Guess a number between 1 and 100: ";
cin >> value;
if (value > num)
{
cout << "The number is lower. Try Again\n";
}
if (value < num)
{
cout << "The number is higher. Try Again\n";
}
else if (value == num)
{
cout << "You've guessed correctly\n";
system ("pause");
cin >> quit;
}
while (quit != 0);
}