Dear Sir,
Could you tell me what is wrong of my program?
The question is: write a progrm that totals up a list of exactly 100 numbers and outputs that total to the screen, also show the average of the 100 numbers.
My program:
program Project2;
{$APPTYPE CONSOLE}
uses
SysUtils;
var
total, number, count: integer;
average: real;
begin
total:=0;
for count:=1 to 100 do
begin
readln(number);
total:=total+number;
end;
writeln(total);
average:=total/100;
writeln(average:6:2);
end.