1) через for
Program Quad;
var a,i: integer;
begin
for i:=11 to 20 do begin
a := i*i;
writeln (i, '^2 = ', a);
end;
end.
2) через while
Program Pow;
i := 11;
while i <= 20 do begin
i:= i+1;
3) через repeat
i:= 11;
repeat
i:=i+1;
until i>20;
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
1) через for
Program Quad;
var a,i: integer;
begin
for i:=11 to 20 do begin
a := i*i;
writeln (i, '^2 = ', a);
end;
end.
2) через while
Program Pow;
var a,i: integer;
begin
i := 11;
while i <= 20 do begin
a := i*i;
writeln (i, '^2 = ', a);
i:= i+1;
end;
end.
3) через repeat
Program Pow;
var a,i: integer;
begin
i:= 11;
repeat
a := i*i;
writeln (i, '^2 = ', a);
i:=i+1;
until i>20;
end.