ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1001. Reverse Root

Pascal, why is it a wrong code?
Posted by NemanjaStojanovic 12 Feb 2012 21:04
program zad;
var a,n,i:longint;
b:array[1..1000] of real;
begin
n:=0;
while not eof do begin
read(a);
n:=n+1;
b[n]:=sqrt(a);
end;
for i:=n downto 1 do
writeln(b[i]:0:4);
end.
Re: Pascal, why is it a wrong code?
Posted by NemanjaStojanovic 12 Feb 2012 21:08
nvrm, fixed it.
Re: Pascal, why is it a wrong code?
Posted by fargale 27 Jan 2014 13:23
As I  think, u should  use dynamic array.