zax2002

https://otvet.mail.ru/question/204036202

Oct 22nd, 2017
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.58 KB | None | 0 0
  1. program salary;
  2. var
  3.     base:array[0..9] of longInt;
  4.     max:longInt;
  5.     i, count:integer;
  6. begin
  7.     base[0] := 48000;
  8.     base[1] := 54700;
  9.     base[2] := 88300;
  10.     base[3] := 50000;
  11.     base[4] := 48000;
  12.     base[5] := 88300;
  13.     base[6] := 39000;
  14.     base[7] := 42000;
  15.     base[8] := 88300;
  16.     base[9] := 87000;
  17.    
  18.     max := base[0];
  19.     for i := 1 to length(base) - 1 do if base[i] > max then max := base[i];
  20.    
  21.     count := 0;
  22.     for i := 0 to length(base) - 1 do if base[i] = max then count := count + 1;
  23.    
  24.     writeln(max);
  25.     writeln(count);
  26. end.
Add Comment
Please, Sign In to add comment