Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
program oken;
uses crt;
var n,i: qword;
kt:boolean;
begin
clrscr;
write('Nhap n: '); readln(n);
for i:=1 to n do
if (i)*(i-1)=n then
begin
kt:=true;
break;
end
else
kt:=false;
if kt=true then
writeln('Co')
else
writeln('Khong');
readln;
end.
Hãy giúp mọi người biết câu trả lời này thế nào?
2377
1794
uses crt;
var n,i:longint;
begin
clrscr;
write('Nhap 1 so:');readln(n);
while (i*(i+1)<>n)and(i<n-1) do inc(i);
if i+1<>n then writeln('Co') else writeln('Khong');
readln
end.
Hãy giúp mọi người biết câu trả lời này thế nào?
Bảng tin