Program Pogodi go brojot;
Var number,guess,i,counter:Integer;
Begin
Randomize;
counter:=0;
For i:=1 To 3 Do Begin
number:=1+Random(3);
WriteLn('---------------------');
WriteLn(i,'. Pogodi go brojot.');
Repeat
Write('Daj mi broj pomegju 1 i 3:');
[B][U]ReadLn(guess)[/U][/B]
If (guess<number) Then Begin
WriteLn('Brojot e premnogu mal. '+' Brojot beshe:',number);
if(i<>) then WriteLn('Obidete se povtorno!');
Else WriteLN('Igrata e zavrsena.');
Break;
End;
If (guess>number) Then Begin
WriteLn('Brojot e premnogu golem.'+' Brojot beshe ',number);
if (i<>3) then WriteLn('Obidete se povtorno!');
Else WriteLn('Igrata e zavrsena.');
Break;
End;
If (guess=number) Then Begin
WriteLn(Cestitki!!!);
if (i<>3) then WriteLn ('Vie go pogodivte brojot!!!);
Else WriteLn('Igrata e zavrsena');
counter:=counter+1;
Break;
End;
Untel guess=number;
End;
WriteLn('-----------------------------------');
WriteLn;
WriteLn('Vkupno poeni:'counter,'of 3');
WriteLn('------------------------------');
ReadLn;
End.