Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.51 KB | None | 0 0
  1. Program 5375;
  2. var i, n, k_oz, a, i_oz, i0, m_oz: integer;
  3. Begin
  4.     readln(n);
  5.     k_oz := 0;
  6.     i_oz := 0; i0 := 0;
  7.     for i := 1 to n do
  8.     begin
  9.         readln(a);
  10.         if (a < 0) then
  11.         begin
  12.             if (k_oz = 0) then
  13.             begin
  14.                 m_oz := a;
  15.                 i_oz := i;
  16.             end;
  17.             if (a > m_oz) then
  18.             begin
  19.                 m_oz := a;
  20.                 i_oz := i;
  21.             end;
  22.             inc(k_oz);
  23.         end;
  24.     end;
  25. End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement