mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-08 09:39:12 +02:00
* current version of sumcol benchmark by Steve Fisher
git-svn-id: trunk@9670 -
This commit is contained in:
parent
27b810b732
commit
2fb2712029
@ -1,19 +1,23 @@
|
|||||||
{ The Great Computer Language Shootout
|
{ The Computer Language Benchmarks Game
|
||||||
http://shootout.alioth.debian.org
|
http://shootout.alioth.debian.org
|
||||||
|
|
||||||
contributed by Ales Katona
|
contributed by Ales Katona
|
||||||
|
modified by Daniel Mantione
|
||||||
|
modified by Steve Fisher
|
||||||
}
|
}
|
||||||
|
|
||||||
program sumcol;
|
{$iochecks off}
|
||||||
|
|
||||||
{$mode objfpc}
|
var
|
||||||
|
num, tot: longint;
|
||||||
var num, tot: longint;
|
textbuf: array[0..8191] of char;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
while not Eof(input) do begin
|
settextbuf(input, textbuf);
|
||||||
ReadLn(input, num);
|
repeat
|
||||||
tot := tot + num;
|
readLn( num );
|
||||||
end;
|
tot += num
|
||||||
WriteLn(tot);
|
until eof;
|
||||||
end.
|
writeLn(tot)
|
||||||
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user