#include<stdio.h>
#include<stdlib.h>
#include<time.h>
int get()
{
int i=getchar();
return i;
}//get
void bye()
{
printf("bye");
exit(0);
}//bye
int main()
{
srand(time(0));
unsigned int ans=rand()%100;
atexit(bye);
for(int i=3;i>0;i--){
printf("Guess a number between 0 and 100");
unsigned int i=get();
if(i==ans)
{
break;
}//if
else
{
printf("Error,%dlifes left.Enter again:",i);
continue;
}//else
}//for
return 0;
}//main