Write(‘Nhap d=’); Readln(d); max:=a; If b>max then max:=b; If c>max then max:=c; if d>max then max:=d; Writeln(‘So lon nhat la: ‘,max: 4: 2); Readln; END
2)IN RA MIN
Program TIM_SO_LON_NHAT; Uses crt; Var a,b,c,d,min: real; BEGIN Clrscr; Writeln(‘TIM SO NHO NHAT TRONG BON SO A, B, C, D’); Write(‘Nhap a=’); Readln(a); Write(‘Nhap b=’); Readln(b); Write(‘Nhap c=’); Readln(c); Write(‘Nhap d=’); Readln(d); max:=a; If b>max then min:=b; If c>max then min:=c; if d>max then min:=d; Writeln(‘So lon nhat la: ‘,min: 4: 2); Readln; END.
1)IN RA MAX
program abc;
uses crt;
var a,b,c,d,max:real;
begin
clrscr;
writeln(‘TIM SO LON NHAT TRONG BON SO A , B ,C , D’);
write(‘nhap a=’);
readln(a);
writerite(‘Nhap b=’);
Readln(b);
Write(‘Nhap c=’);
Readln(c);
Write(‘Nhap d=’);
Readln(d);
max:=a;
If b>max then max:=b;
If c>max then max:=c;
if d>max then max:=d;
Writeln(‘So lon nhat la: ‘,max: 4: 2);
Readln;
END
2)IN RA MIN
Program TIM_SO_LON_NHAT;
Uses crt;
Var a,b,c,d,min: real;
BEGIN Clrscr;
Writeln(‘TIM SO NHO NHAT TRONG BON SO A, B, C, D’);
Write(‘Nhap a=’);
Readln(a);
Write(‘Nhap b=’);
Readln(b);
Write(‘Nhap c=’);
Readln(c);
Write(‘Nhap d=’);
Readln(d);
max:=a;
If b>max then min:=b;
If c>max then min:=c;
if d>max then min:=d;
Writeln(‘So lon nhat la: ‘,min: 4: 2);
Readln;
END.