Dan an array of ten integers. Write a program for counting the number of elements of this array that have the maximum value.
Answer 1, Authority 100%
In principle, this is the standard task
Program Test; const n = 10; VAR A: Array [1..10] of Integer; I, MA, K: Integer; Begin. For i: = 1 to n do begin A [I]: = - 2 + Random (4); WRITE (A [I], ''); end; Writeln; k: = 1; MA: = A ; For i: = 2 to n Do Begin IF A [I] = MA THEN K: = K + 1 ELSE. IF A [I] & GT; MA THEN Begin. MA: = A [I]; k: = 1; end; end; Writeln (k); end.