uses wincrt;
var
i, o, p, hasil: integer;
begin
writeln ('a pangkat b');
write ('a = ');
readln (o);
write ('b = ');
readln (p);
hasil:= 1;
for i:= 1 to abs (p) do
hasil:= o*hasil;
if (p<o) then
begin
write ('hasil = ');
write (1/hasil);
end
else
begin
write ('hasil = ');
write (hasil);
end;
end.
0 komentar:
Posting Komentar