Почему выводится ноль в программе?

program pr1;
var a: real;
n: longint;
function power (a:real; n:longint): real;
begin
var i: integer;
var anew: real;
anew:=a;
for i:= 2 to n do
begin
a:=a*anew;
end;
end;
begin
readln (a, n);
writeln (power(a, n));
end.
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.