#include "stdio.h"
#include "stdlib.h"
#include "time.h"
void guess();
main()
{
printf("You have 10$./n");
guess();
}
void guess()
{
int num=0,temp=0;
int m=10;
char c;
do
{
srand(time(NULL));
num=rand();
num=num%2+1;
printf("please press B or S:");
c=getche();
c=='b'?temp=1:(c=='s'?temp=2:exit(1));
if((temp==num)&&(temp==1)) m+=8;
if((temp==num)&&(temp==2)) m+=4;
if(temp!=num) m-=5;
printf("You have %d$/n",m);
}while((temp==1)||(temp==2));
}