programHelloWorld;
var sum :double;
var i :integer;
begin
//sum := (50*(50+1)/2)/50;
for i:=1 to 50 do
sum:= sum + i;
sum:= sum/50;
writeln('Средне-арифметическое от 1 до50 равно:');
writeln(sum:15:2);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
programHelloWorld;
var sum :double;
var i :integer;
begin
//sum := (50*(50+1)/2)/50;
for i:=1 to 50 do
sum:= sum + i;
sum:= sum/50;
writeln('Средне-арифметическое от 1 до50 равно:');
writeln(sum:15:2);
end.