2 câu trả lời
program oken;
uses crt;
var x,n,i,k:longint;
begin
clrscr;
write('nhap so nguyen: '); readln(x);
write('nhap so mu cua ',x,': '); readln(n);
k:=1;
for i:=1 to n do
k:=k*x;
writeln(x,'^',n,'=',k);
readln;
end.
Program TINH_X_LUY_THUA_N;
Uses crt;
Var i,n,x:integer;
lt:real;
Begin
Writeln(' TINH X LUY THUA Y:');
Writeln('----------------------------------');
Write('Nhap x ='); readln(x);
Write('Nhap n ='); readln(n);
lt:=1;
For i:=1 to n do
lt:=lt*x;
Writeln(x, '^',n,' = ',lt:4:2);
Readln;
End.
Câu hỏi trong lớp
Xem thêm