|
|
вернуться в форумWrong answer... Послано Cross 28 янв 2011 01:04 What's wrong? program Project1; {$APPTYPE CONSOLE} uses SysUtils; var i,n:integer; data:string; tmp:array of string; begin readln(data); n:=0; SetLength(tmp,length(data)+1); for i:= 1 to length(data) do begin if not(data[i]=' ')then tmp[n]:=tmp[n]+data[i]; if (data[i]=' ')and (data[i+1]<>' ')then n:=n+1; end; for i:=n downto 1 do writeln(sqrt(StrToFloat(tmp[i])):0:4); readln; end. Re: Wrong answer... Послано Tima 7 апр 2011 12:47 for i:=n downto 0 do writeln(sqrt(StrToFloat(tmp[i])):0:4); Edited by author 07.04.2011 12:47 |
|
|