1) с for: Program n1; var a,sum: real; i: integer; begin sum:=0; for i:=1 to 9 do begin readln(a); sum:=sum+a; end; writeln(sum); end. 2) с while: Program n1; var a,sum: real; i: integer; begin sum:=0; i:=0; while i<9 do begin readln(a); sum:=sum+a; i:=i+1; end; writeln(sum); end. 3) с repeat: Program n1; var a,sum: real; i: integer; begin sum:=0; i:=0; repeat readln(a); sum:=sum+a; i:=i+1; until (i=9); writeln(sum); end.
Program n1;
var a,sum: real;
i: integer;
begin
sum:=0;
for i:=1 to 9 do
begin
readln(a);
sum:=sum+a;
end;
writeln(sum);
end.
2) с while:
Program n1;
var a,sum: real;
i: integer;
begin
sum:=0;
i:=0;
while i<9 do
begin
readln(a);
sum:=sum+a;
i:=i+1;
end;
writeln(sum);
end.
3) с repeat:
Program n1;
var a,sum: real;
i: integer;
begin
sum:=0;
i:=0;
repeat
readln(a);
sum:=sum+a;
i:=i+1;
until (i=9);
writeln(sum);
end.