nhập 4 số nguyên và in ra màn hình số lớn nhất 03/08/2021 Bởi Bella nhập 4 số nguyên và in ra màn hình số lớn nhất
program azkp; uses Crt; var a,b,c,d : integer; begin Write(‘ Nhap so thu nhat : ‘); readln(a); Write(‘ Nhap so thu hai : ‘); readln(b); Write(‘ Nhap so thu ba : ‘); readln(c); Write(‘ Nhap so thu bon: ‘); readln(d); If (a > b) and (a > c) and (a > d) then Write(‘ So lon nhat la ‘,a); If (b > a) and (b > c) and (b > d) then Write(‘ So lon nhat la ‘,b); If (c > a) and (c > b) and (c > d) then Write(‘ So lon nhat la ‘,c); If (d > b) and (d > c) and (d > a) then Write(‘ So lon nhat la ‘,d); readln end. Bình luận
uses crt; var a,b,c,d :longint; begin clrscr; readln(a,b,c,d); write(‘So lon nhat: ‘); if (a>b) and (a>c) and (a>d) then write(a); if (b>a) and (b>c) and (b>d) then write(b); if (c>a) and (c>b) and (c>d) then write(c); if (d>a) and (d>b) and (d>c) then write(d); readln end. Bình luận
program azkp;
uses Crt;
var a,b,c,d : integer;
begin
Write(‘ Nhap so thu nhat : ‘); readln(a);
Write(‘ Nhap so thu hai : ‘); readln(b);
Write(‘ Nhap so thu ba : ‘); readln(c);
Write(‘ Nhap so thu bon: ‘); readln(d);
If (a > b) and (a > c) and (a > d) then Write(‘ So lon nhat la ‘,a);
If (b > a) and (b > c) and (b > d) then Write(‘ So lon nhat la ‘,b);
If (c > a) and (c > b) and (c > d) then Write(‘ So lon nhat la ‘,c);
If (d > b) and (d > c) and (d > a) then Write(‘ So lon nhat la ‘,d);
readln
end.
uses crt;
var a,b,c,d :longint;
begin
clrscr;
readln(a,b,c,d);
write(‘So lon nhat: ‘);
if (a>b) and (a>c) and (a>d) then write(a);
if (b>a) and (b>c) and (b>d) then write(b);
if (c>a) and (c>b) and (c>d) then write(c);
if (d>a) and (d>b) and (d>c) then write(d);
readln
end.