program zB_3_6 uses crt function Max integer integer var mx integer be

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
program zB_3_6;
uses crt;
function Max(a,b,c,d: integer): integer;
var mx:integer;
begin
if a>b then mx:=a else mx:=b;
if c>mx then mx:=c;
if d>mx then mx:=d;
Max:=mx;
end;
var a,b,c,d : integer;
begin
clrscr;
{Vvodim chilsovie dannie}
writeln('VVedite chisla ');
write('VVedite a = '); readln(a);
write('VVedite b = '); readln(b);
write('VVedite c = '); readln(c);
write('VVedite d = '); readln(d);
writeln(' a = max(a,b,c,d) : ', (a = Max(a,b,c,d)));
readln;
end.