Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  aaa
Language: PASCAL
Code:
program HelloWorld;
label p1,p2,ng;
var a,b,c,d,e,f:integer;
begin;
ng:
p1:
clrscr;
randomize;
a:=random(10)+2;

case a of
2:writeln('двойка');
3:writeln('troyka');
4:writeln('chetvyorka');
5:writeln('pyatorka');
6:writeln('shestyorka');
7:writeln('semyorka');
8:writeln('vosmyorka');
9:writeln('devyanka');
10:writeln('desyatka');
11:writeln('tuz');
c:=a+c;
end;
writeln('u vas ',c,' ochkov');
writeln('1 esli esho 2 esli hvatit');
readln(d);
if d=1 then goto p1 else goto p2;
p2:
clrscr;
randomize;
b:=random(10)+2;
case b of 
2:writeln('двойка');
3:writeln('troyka');
4:writeln('chetvyorka');
5:writeln('pyatorka');
6:writeln('shestyorka');
7:writeln('semyorka');
8:writeln('vosmyorka');
9:writeln('devyanka');
10:writeln('desyatka');
11:writeln('tuz');
end;
e:=b+e;
writeln('u vs ',e,' ochkov');
writeln('1 esli esho 2 esli hvatit');
readln(f);
if f=1 then goto p2 else goto itog;
itog:
if a>b then writeln('igrok 1 wins') else
 if a<b then writeln('igrok 2 wins') else
  writeln('nichya');
readln;
end.
          
Comments: