Program Multy;var i, n, x, mt:integer;beginwrite('введите целое число X ');readln(x);write('введите степень N ');readln(n);mt:=x;for i:=1 to (n-1) do begin mt:=mt*x; end;writeln(x,' в степени ',n,' равно ',mt);end.
program power;
var i, n, x, res:integer;
begin
readln(x, n);
res:=x;
for i:=1 to (n-1) do
res:=res*x;
end;
writeln(res);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Program Multy;
var i, n, x, mt:integer;
begin
write('введите целое число X ');
readln(x);
write('введите степень N ');
readln(n);
mt:=x;
for i:=1 to (n-1) do
begin
mt:=mt*x;
end;
writeln(x,' в степени ',n,' равно ',mt);
end.
Verified answer
program power;
var i, n, x, res:integer;
begin
readln(x, n);
res:=x;
for i:=1 to (n-1) do
begin
res:=res*x;
end;
writeln(res);
end.