Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program fddffd;
- const n = 5;
- var i,min,max:integer;
- a:array[1..n] of integer;
- begin
- min := 32767;
- max := -32768;
- for i:=1 to n do
- a[i] := random(1337 mod 323);
- for i:=1 to n do
- begin
- if a[i] > max then max := a[i]
- end;
- for i:=1 to n do
- begin
- if a[i] < min then min := a[i]
- end;
- for i:=1 to n do
- begin
- if a[i] mod 2 = 0 then
- writeln(a[i],' четный');
- end;
- writeln('min = ' , min, ' ', 'max = ', max);
- writeln('sum = ', max+min);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement