level 2
杀兔者2
楼主
uses dos,crt;label 1;var a:array[1..9,1..9]of byte; b,c,d,e,f,g,h,sc,e2,e3:integer; t1,t2,t3,t4,t5,t6,t7,t8:word; tt1,tt2:real;begin writeln('This game is a very good game for you,you need to know which is bigger,0 or 1?'); writeln('Are you ready?The game will begin in 10 seconds'); delay(10000); sc:=0; for b:=1 to 10 do begin f:=0; g:=0; for c:=1 to 9 do for d:=1 to 9 do begin randomize; e:=random(2); a[c,d]:=e; if e=0 then f:=f+1; if e=1 then g:=g+1; write(e,' '); if d=9 then writeln; end; gettime(t1,t2,t3,t4); tt1:=t1*3600+t2*60+t3+t4/100; readln(h); if (h=1) or (h=0) then gettime(t5,t6,t7,t8); tt2:=t5*3600+t6*60+t7+t8/100; if tt2-tt1>4.5 then goto 1; if ((h=0) and (f>g)) or ((h=1) and (f<g)) then begin writeln('right');sc:=sc+10;end else writeln('wrong'); 1: end; writeln('Total:',sc); readln;end.
2012年09月09日 12点09分
1
