Advertisement
CLazStudio

q198999079

Mar 14th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.37 KB | None | 0 0
  1. program q198999079;
  2. const arr: array [1..8] of integer = (1, 5, 3, 9, 8, 0, 3, -2);
  3. var count, max, i: integer;
  4. begin
  5.   count := 0;
  6.   max := arr[1];
  7.   for i := 1 to 8 do
  8.   begin
  9.     if (arr[i] > max) then max := arr[i];
  10.     if (arr[i] mod 2 <> 0) then Inc(count);
  11.     write(arr[i], ' ');
  12.   end;
  13.   writeln;
  14.   writeln('Count = ', count);
  15.   writeln('Max = ', max);
  16. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement