program ba_so_a_b_c;
uses crt;
var a, b, c, sodu, binhphuong, max, tong, s: real;
begin
write('nhap so thu nhat a: '); readln(a);
write('nhap so thu hai b: '); readln(b);
write('nhap so thu ba c: '); readln(c);
s:=a+b+c;
writeln('tong bao so a b c la: ',s);
binhphuong:=a*a;
tong:=b+c;
sodu:=binhphuong mod tong;
writeln('so du can tim la: ',sodu:2:2);
max:=a;
if max<b then max:=b;
if max<c then max:=c;
writeln('So lon nhat trong 3 so la: ', max:0:4);
readln;
end.
program tinh_tich;
use crt;
var tich, i :integer;
begin
writeln('-------------nguyen mit hot boy------------------------');
tich:=1;
for i:=1 to 2013 do
if (i mod 2<>0) then tich:=tich*i;
if i>2013 then writeln('tich can tim la: ',tich);
readln;
end.
program kiem_tra_so_nguyen
uses crt;
var i, n : integer;
begin
clrscr;
write('nhap vao mot so de kiem tra : '); readln(n);
if (n mod i <>o) then writeln('so do la so le !') esle writeln('so do la so chan');
if n<=1 then writeln('nhap lai so khac') else
begin
i:=2;
while (n mod i <>0) do i:=i+1;
if (i=n) then writeln('day phai la so nguyen to!')
else writeln('day khong phai la so nguyen to!');
end;
t:=0;
for j:=1 to n-1 do
if (n mod i) =0 then t:=t+j;
if (n=t) then write('n la so hoan hao');
readln;
end.program kiem_tra_so_nguyen;
uses crt;
var i, n : integer;
begin
clrscr;
write('nhap vao mot so de kiem tra : '); readln(n);
if n<=1 then writeln('nhap lai so khac') else
begin
i:=2;
while (n mod i <>0) do i:=i+1;
if (i=n) then writeln('day phai la so nguyen to!')
else writeln('day khong phai la so nguyen to!');
end;
readln;
end.