#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#include<time.h>
void main()
{
int i;
char c;

randomize();
i=random(99);

if(!(i%2==0))
i++;

printf("\nHi this is a game.... think of a no.. and multiply it with 2.. when ready press enter...\n");
c=getch();

printf("\nNow add it with %d..when ready press enter..\n",i);
c=getch();

printf("\nNow divide the result with 2.. press enter when ready..\n");
c=getch();

printf("\nSubtract the  got result from the original no that you thought.. press enter when you are ready...\n");
c=getch();

printf("\n\t\t The answer that you got is.... %d\n\n",i/2);
getch();

clrscr();
}
1
Contributor
0
Replies
2
Views
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.