Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
uses crt;
var n:integer;
begin
clrscr;
readln(n);
if trunc(sqrt(n))=sqrt(n) then writeln('yes')
else writeln('no');
readln;
end.
uses crt;
var n:integer;
begin
clrscr;
repeat
write('Nhap n='); readln(n);
until n>0;
if sqrt(n)=trunc(sqrt(n)) then writeln(n,' la so chinh phuong')
else writeln(n,' khong la so chinh phuong');
readln;
end.
{PROGRAM bai_tap;
USES crt ;
VAR i , n, t:integer;
BEGIN
clrscr;
Write('Nhap n');Readln(n);
t:=0;
For i:=1 to n-1 do
if n mod i=0 then t:=t+i;
if t=n then write(n,' la so hoan chinh');
else Writeln(n,' Khong la so hoan chinh');
Readlnnline Pascal Compiler.
begin
End,
Readlnnline
END.
}
#include <bits/stdc++.h>
using namespace std;
long long n,i,t;
int main()
{
cin>>n;
t=0;
for (i=1; i<=n/2; i++)
if (n%i==0) t=t+i;
if (t==n) cout<<"YES";
else cout<<"NO";
return 0;
}
uses crt;
var i,n,t:integer;
begin
clrscr;
readln(n);
t:=0;
for i:=1 to n do
if sqrt(i)=trunc(sqrt(i)) then t:=t+i;
writeln(t);
readln;
end.
#include <bits/stdc++.h>
using namespace std;
long long n,i,x;
bool kt,kt1;
int main()
{
cin>>n;
kt=true;
for (i=2; i<=sqrt(n); i++)
if (n%i==0) kt=false;
if ((kt==true) and (n>1)) kt1=true;
else kt1=false;
if (n%2==0) kt1=true;
x=sqrt(n);
if (x*x==n) kt1=true;
if (kt1==true) cout<<"TRUE";
else cout<<"FALSE";
return 0;
}
Câu 58:
Var n:integer;
Begin
Write('n = ');readln(n);
If n mod 2 <> 0 then write(n,' la so le')
Else write(n,' khong la so le');
Readln
End.
Câu 61:
Var n:integer;
Begin
Write('n = ');readln(n);
If n mod 2 = 0 then write(n,' la so chan')
Else write(n,' khong la so chan');
Readln
End.
const
fi='sochinhphuong.inp';
fo='sochinhphuong.out';
var f,g:text;n:longint;
function scp(n:longint):boolean;
begin
if (sqr(trunc(sqrt(n)))=n) then exit (true);
exit (false);
end;
begin
assign(f,fi);reset(f);
assign(g,fo);rewrite(g);
readln(f,n);
if scp(n) then writeln(g,'yes') else
writeln(g,'no');
close(f);close(g);
end.