[Login|Register]
New post

Show post

Search forum

Read post
what's wrong [ Topic ] 2009-11-22 09:56:48 chinshiketsu
var a:array[0..2000]of qword;
    n,i:longint;
begin
a[0]:=0;
a[1]:=1;
for i:=2 to 75 do a[i]:=a[i-1]+a[i-2];
while not eof do
  begin
  readln(n);
  writeln('The Fibonacci number for ',n,' is ',a[n]);
  end;
end.
         
Reply
Title
Message
(64K)
University of Science and Technology of China
Online Judge for ACM/ICPC
Processed in 0.8ms with 2 query(s).