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.
program CheckOddNumber;
function IsOddNumber(n: integer): boolean;
begin
if n mod 2 = 1 then
IsOddNumber := true
else
IsOddNumber := false;
end;
var
n: integer;
begin
writeln('Nhap mot so nguyen duong: ');
readln(n);
if IsOddNumber(n) then
writeln(n, ' la so le.')
else
writeln(n, ' ko la so le.');
readln;
end.
function ktra(a,b,c:integer):boolean;
var kt:boolean;
begin
if (a>0) and (b>0) and (c>0) and (a+b>c) and (a+c>b) and (b+c>a) then kt:=true
else kt:=false;
if kt=true then ktra:=true
else ktra:=false;
end;
python.
N = input(nhap so nguyen N)
if n%2 == 0:
print('N la so chan')
else:
print('N la so le')
#include <bits/stdc++.h>
using namespace std;
long long n;
int main()
{
cin>>n;
if (n%2!=0) cout<<"La so le";
else cout<<"Khong la so le";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
long long n,i;
bool kt;
int main()
{
freopen("checknto.inp","r",stdin);
freopen("checknto.out","w",stdout);
cin>>n;
kt=true;
for (i=2; i*i<=n; i++)
if (n%i==0) kt=false;
if (kt==true && n>1) cout<<"YES";
else cout<<"NO";
return 0;
}
uses crt;
var i,n,s: integer;
a:array[1..100] of integer;
begin
writeln('Nhap n: '); read(n);
for i:=1 to n do
begin
write('a[',i,'] = '); readln(a[i]);
end;
writeln('Cac so le: ')
s:=0;
for i:=1 to n do
if a[i] mod 2 <> 0 then
begin
s:=s+a[i];
write(a[i],' ');
end;
writeln('- Tong so le: ',s);
for i:=1 to trunc(sqrt(s)) do if s mod i = 0 then d:=d+1;
if d > 1 then writeln('Tong do khong la so nguyen to') else writeln('Tong do la so nguyen to');
readln
end.
#include <bits/stdc++.h>
using namespace std;
long long n;
int main()
{
cin>>n;
bool kt=true;
for (int i=2; i*i<=n; i++)
if (n%i==0) kt=false;
if (kt==true && n>=2) cout<<"YES";
else cout<<"NO";
return 0;
}
uses crt;
var a,b,c:real;
begin
clrscr;
readln(a,b,c);
if (a>0) and (b>0) and (c>0) and (a+b>c) and (a+c>b) and (b+c>a) then
begin
if (a=b) and (b=c) then write('Day la tam giac deu')
else writeln('Day khong la tam giac deu');
end
else writeln('Day khong la ba canh trong mot tam giac');
readln;
end.
function ktra(n:integer):boolean;
var kt:boolean;
begin
if trunc(sqrt(n))=sqrt(n) then kt:=true
else kt:=false;
if kt=true then ktra:=true
else ktra:=false;
end;