Nhập 3 số nguyên bất kì từ bàn phím. Đưa ra màn hình số lớn nhất trong 3 số vừa nhập.
Chương trình:
Program max_3so;
Var
so1,so2,so3,max:Integer;
Begin
Writeln(′TIM SO LON NHAT TRONG 3 SO NGUYEN′);
Write(′-Nhap so thu nhat: ′);
Readln(so1);
Write(′-Nhap so thu hai : ′);
Readln(so2);
Write(′-Nhap so thu ba : ′);
Readln(so3);
If so1 < so2 Then
max:=so2
Else
max:=so1;
If max < so3 Then
max:=so3;
Writeln;
Writeln(′+So lon nhat trong 3 so la: ′,max);
Writeln;
Writeln(′Bam phim <Enter> de ket thuc′);
Readln
End.
Link Source: http://phanchutrinh.vn/hinh/max%203%20so.rar