|  | 
|  | 
| back to board | HELP NEEDED PLEASE !!! Posted by Nurbek  21 Mar 2006 01:54Please could you help me on test 2. I've problem in TL.What's problem ???
get your code! Posted by +FAMAS+  23 Mar 2006 11:03Re: get your code! Posted by Nurbek  21 Apr 2006 03:09varl,code:integer; x,y:real; c:char;
 procedure bas;
 begin
 if c='1' then begin  x:=x-sqrt(2)/2; y:=y-sqrt(2)/2; exit;end;
 if c='2' then begin y:=y-1; exit; end;
 if c='3' then begin x:=x+sqrt(2)/2; y:=y-sqrt(2)/2; exit; end;
 if c='4' then begin x:=x-1; exit; end;
 if c='6' then begin x:=x+1; exit; end;
 if c='7' then begin x:=x-sqrt(2)/2; y:=y+sqrt(2)/2; exit; end;
 if c='8' then begin y:=y+1; exit; end;
 if c='9' then begin x:=x+sqrt(2)/2; y:=y+sqrt(2)/2; exit; end;
 end;
 begin
 repeat
 read(c);
 bas;
 until (c=#13)or(c='0');
 write((x):0:10); write(' '); write((y):0:10);
 end.
 | 
 | 
|