const fi='gicungduoc.inp';
fo='gicungduoc.out';
var a,i:longint;
function checkprime(x:longint):boolean;
var i:longint;
begin
if x<2 then exit(false);
for i:=2 to trunc(sqrt(x)) do if x mod i = 0 then exit(false);
exit(true);
end;
function hoanhao(n:longint):boolean;
var x,dem,c:longint;
begin
dem:=0;
for x:=1 to n-1 do
if n mod x=0 then
dem:=dem+x;
if dem=n then exit(true);
exit(false);
end;
function doixung(x:longint):boolean;
var c:longint;
s:ansistring;
begin
str(x,s);
for c:=1 to length(s) div 2 do
if s[1+c-1]<>s[length(s)-c+1] then exit(false);
exit(true);
end;
function chinhphuong(x:longint):boolean;
begin
if sqrt(x) = trunc(sqrt(x)) then exit(true);
exit(false);
end;
begin
assign(input,fi);
reset(input);
read(a);
close(input);
assign(output,fo);
rewrite(output);
if doixung(a) then writeln('Doi xung') else writeln('Khong doi xung');
write('Cac so nguyen to tu 1 den a la: ');
for i:=1 to a do
if checkprime(i) then write(i,' ');
writeln;
write('Cac so hoan hao tu 1 den a la: ');
for i:=1 to a do
if hoanhao(i) then write(i,' ');
writeln;
write('Cac so chinh phuong tu 1 den a la: ');
for i:=1 to a do
if chinhphuong(i) then write(i,' ');
writeln;
write('Cac so doi xung tu 1 den a la: ');
for i:=1 to a do
if doixung(i) then write(i,' ');
close(output);
end.
uses crt;
var d:text; i,a:longint;
function nt(a:longint):boolean;
var i:longint;
begin
i:=2;
while(a>2)and(a mod i<>0)do inc(i);
nt:=i=a;
end;
function ht(a:longint):boolean;
var i,dem:longint;
begin
dem:=0;
for i:=1 to a do If a mod i=0 then dem:=dem+i;
ht:=dem=a*2;
end;
function cp(a:longint):boolean;
var i:longint;
begin
for i:=1 to a do If (i*i=a) then exit(true);
exit(false);
end;
function dx(a:longint):boolean;
var i:longint; s,m:string;
begin
m:='';
str(a,s);
for i:=length(s) downto 1 do m:=m+s[i];
If m=s then exit(true) else exit(false);
end;
begin
clrscr;
assign(d,'input.pas');reset(d);
readln(d,a);
If dx(a) then writeln('Co') else writeln('Khong');
for i:=1 to a do If nt(i) then write(i,';'); writeln;
for i:=1 to a do If ht(i) then write(i,';'); writeln;
for i:=1 to a do If cp(i) then write(i,';'); writeln;
for i:=1 to a do If dx(i) then write(i,';');
close(d);
readln
end.
Tin học, tiếng Anh: informatics, tiếng Pháp: informatique, là một ngành khoa học chuyên nghiên cứu quá trình tự động hóa việc tổ chức, lưu trữ, xử lý và truyền dẫn thông tin của một hệ thống máy tính cụ thể hoặc trừu tượng (ảo). Với cách hiểu hiện nay, tin học bao hàm tất cả các nghiên cứu và kỹ thuật có liên quan đến việc mô phỏng, biến đổi và tái tạo thông tin.
Nguồn : Wikipedia - Bách khoa toàn thưLớp 9 - Là năm cuối ở cấp trung học cơ sở, sắp phải bước vào một kì thi căng thẳng và sắp chia tay bạn bè, thầy cô và cả kì vọng của phụ huynh ngày càng lớn mang tên "Lên cấp 3". Thật là áp lực nhưng các em hãy cứ tự tin vào bản thân là sẻ vượt qua nhé!
Nguồn : ADMIN :))Copyright © 2021 HOCTAP247