wa21 give me please wrong test var x,p,col,m,mp,ygol,n,np,otk:longint; c:char; procedure oxrana; begin if m=0 then writeln('STOP') else if abs(ygol)<5 then writeln('FIRE ',p) else if ygol<0 then writeln('RIGHT ',x) else writeln('LEFT ',x); end; procedure zashita; begin if m*20>=p then if abs(ygol)<5 then writeln('FIRE ',p) else writeln('BACKWARD ',x) else oxrana; end; procedure ataka; begin readln(n,np); if n*np>m*mp*3 then if abs(ygol)<10 then writeln('FIRE ',p) else writeln('FRONT ',x) else if abs(ygol)<5 then writeln('FIRE ',p) else writeln('BACKWARD ',x); end; procedure patrul; var ygl:longint; begin readln(otk); if otk<-90 then ygl:=180-abs(otk); if otk>90 then ygl:=-(180-abs(otk)); if abs(ygol)<5 then zashita else if (abs(otk)>20) then if ygl<0 then writeln('LEFT ',x) else writeln('RIGHT ',x) else writeln('BACKWARD ',x) end; begin readln(x,p); if x>100 then x:=100; IF P>20 then p:=20; readln(c); readln(m,mp,ygol); if c='G' then oxrana; if c='D' then zashita; if c='A' then ataka; if c='P' then patrul; end. wa22 PEOPLE HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Posted by +FAMAS+ 23 Aug 2005 04:50 var x,p,col,m,mp,ygol,n,np,otk:longint; c:char; procedure oxrana; begin if m=0 then writeln('STOP') else if abs(ygol)<5 then writeln('FIRE ',p) else if ygol<0 then writeln('RIGHT ',x) else writeln('LEFT ',x); end; procedure zashita; begin if m*20>=p then if abs(ygol)<5 then writeln('FIRE ',p) else writeln('BACKWARD ',x) else oxrana; end; procedure ataka; begin readln(n,np); if n*np>m*mp*3 then if abs(ygol)<10 then writeln('FIRE ',p) else writeln('FRONT ',x) else if abs(ygol)<5 then writeln('FIRE ',p) else writeln('BACKWARD ',x); end; procedure patrul; begin readln(otk); if (m<>0) then zashita else begin if abs(otk)<=20 then writeln('FRONT ',x) else if (otk<=-159) or (otk>=160) then writeln('BACKWARD ',x) else begin if otk<-90 then otk:=180-abs(otk); if otk>90 then otk:=-(180-abs(otk)); if otk<0 then writeln('LEFT ',x) else writeln('RIGHT ',x); end; END; end; begin readln(x,p); if x>100 then x:=100; IF P>20 then p:=20; readln(c); readln(m,mp,ygol); if c='G' then oxrana; if c='D' then zashita; if c='A' then ataka; if c='P' then patrul; end. Re: wa22 PEOPLE HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! sorry i can't. A test for you (+) 1 1 P 0 0 0 165 STOP Your answer: STOP Correct answer: BACKWARD 1 |