Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program q198999079;
- const arr: array [1..8] of integer = (1, 5, 3, 9, 8, 0, 3, -2);
- var count, max, i: integer;
- begin
- count := 0;
- max := arr[1];
- for i := 1 to 8 do
- begin
- if (arr[i] > max) then max := arr[i];
- if (arr[i] mod 2 <> 0) then Inc(count);
- write(arr[i], ' ');
- end;
- writeln;
- writeln('Count = ', count);
- writeln('Max = ', max);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement