2 câu trả lời
program A01;
uses crt;
var n : integer;
begin
clrscr;
write('Nhap so n = '); readln(n);
if n > 0 then
if sqr(trunc(sqrt(n))) = n then
write(n,' la so chinh phuong')
else
write(n,' khong la so chinh phuong')
else
write(n,' khong la so chinh phuong');
readln
end.
uses crt;
var i,n:integer;
begin
readln(n);
i:= trunc(sqrt(n));
if i*i=n then write(n, ' la so chinh phuong')
else write(n, 'ko p la so chinh phuong');
readln
end.
:)
Câu hỏi trong lớp
Xem thêm