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 m,n:integer;
begin
clrscr;
readln(m,n);
if (m>n) cout<<"m lon hon"
else cout<<"n lon hon";
readln;
end.
uses crt;
var a,b,ucln,bcnn,i:integer;
begin
clrscr;
write('Nhap a='); readln(a);
write('Nhap b='); readln(b);
ucln:=1;
if a<b then begin
for i:=1 to a do
if (a mod i=0) and (b mod i=0) then begin
if ucln<i then ucln:=i;
end;
end else begin
for i:=1 to b do
if (a mod i=0) and (b mod i=0) then
begin
if ucln<i then ucln:=i;
end;
end;
bcnn:=a*b;
for i:=a*b-1 downto 1 do
if (i mod a=0) and (i mod b=0) then
begin
if bcnn>i then bcnn:=i;
end;
writeln('Uoc chung lon nhat la: ',ucln);
writeln('Boi chung nho nhat la: ',bcnn);
readln;
end.
uses crt;
var a:array[1..100]of integer;
i,n,d,j,kt:integer;
st:string;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
for i:=1 to n do
begin
str(a[i],st);
d:=length(st);
kt:=0;
for j:=1 to d do
if st[j]<>st[d-j+1] then kt:=1;
if kt=0 then write(st:4);
end;
readln;
end.
program max_min;
uses crt;
var i,n,max,min:integer;
a:array[1..100]of integer;
begin
clrscr;
write('nhap n:');readln(n);
for i:=1 to n do
begin
write('a[',i,']=');readln(a[i]);
end;
writeln('day vua nhap la:');
for i:=1 to n do
write(a[i]:3);
writeln;
max:=a[1];min:=a[1];
for i:=1 to n do
begin
if a[i]>max then max:=a[i];
if a[i]<min then min:=a[i];
end;
writeln('gia tri lon nhat: ',max,' gia tri nho nhat: ',min);
readln;
end.
uses crt;
var a:array[1..1000000] of longint;
n,i,max,min:longint;
begin
clrscr;
write('Nhap so luong phan tu: '); readln(n);
for i:=1 to n do
begin
write('Nhap phan tu thu ',i,': '); readln(a[i]);
end;
write('Day so vua nhap: ');
for i:=1 to n do write(a[i],' '); writeln;
max:=a[1];min:=a[1];
for i:=2 to n do
begin
if a[i]>max then max:=a[i];
if a[i]<min then min:=a[i];
end;
writeln('GTLN: ',max);
writeln('GTNN: ',min);
readln;
end.
!@##%%^#%#@^$($%#$^$%$$#^#%T^^U$
2125151616151611