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 1068. Sum

What's wrong?
Posted by Tharkun 18 Oct 2002 21:26
var x,a,c:longint;
begin
readln(a);
c:=0;
if a>1 then for x:=a downto 1 do begin c:=c+x; end;
if a<1 then for x:=a to 1 do begin c:=c+x; end;
writeln(c);
end.