program Noname4; uses crt; var guess,pointused,c,d,e,total,status,score,bonus : integer; f : string; g : char; begin score:=1000; repeat randomize(); clrscr; writeln('Welcome! You got ',score,' points.'); writeln(); writeln('Make Your Guess'); writeln('=========='); writeln('1. BIG'); writeln('2. SMALL'); write('==>'); readln(guess); writeln(); write('How many points do you want to use? ==>'); readln(pointused); writeln(); writeln('Press enter to draw the dice.'); c:=random(6)+1; d:=random(6)+1; e:=random(6)+1; writeln('Guess the three numbers of the dice==>(1st number)'); readln(a); write(c,' ',d,' ',e); total := c+d+e; writeln('Total: ',total); if total<=10 then begin status := 2; writeln('SMALL'); writeln(); end; if total>10 then begin status :=1; writeln('BIG'); writeln(); bonus:=(pointused*2); end; if status=guess then begin writeln('You won! You got ',bonus,' bonus points!'); score:= score+bonus; writeln('Your score is ',score,' now.'); writeln(); end; if status<>guess then begin writeln('Sorry! Your guess is wrong!'); score:=score-pointused; writeln('Your score is ',score,' now.'); end; write('Do you want to play again?(Y/N)'); readln(g); Readln(); until g = 'n'; end.