Var a,b,c,d,e,max:integer; begin writeln('a, b, c, d, e:'); readln(a,b,c,d,e); If a>b then max:=a else max:=b; If c>max then max:=c; If d>max then max:=d; If e>max then max:=e; Writeln('max = ',max); End.
Var a,b,c,d,e,max:integer; begin readln(a,b,c,d,e); If (a>b) and (a>c) and (a>d) and (a>e) then max:=a; If (b>a) and (b>c) and (b>d) and (b>e) then max:=b; If (c>a) and (c>b) and (c>d) and (c>e) then max:=c; If (d>a) and (d>b) and (d>c) and (d>e) then max:=d; If (e>a) and (e>b) and (e>c) and (e>d) then max:=e; Writeln(max); End.
begin
writeln('a, b, c, d, e:');
readln(a,b,c,d,e);
If a>b then max:=a else max:=b;
If c>max then max:=c;
If d>max then max:=d;
If e>max then max:=e;
Writeln('max = ',max);
End.
Пример:
a, b, c, d, e:
8 5 2 9 4
max = 9
begin
readln(a,b,c,d,e);
If (a>b) and (a>c) and (a>d) and (a>e) then max:=a;
If (b>a) and (b>c) and (b>d) and (b>e) then max:=b;
If (c>a) and (c>b) and (c>d) and (c>e) then max:=c;
If (d>a) and (d>b) and (d>c) and (d>e) then max:=d;
If (e>a) and (e>b) and (e>c) and (e>d) then max:=e;
Writeln(max);
End.