An array is given, such as
0 0 1 1 1 0 1 1 1
It is required to display the number of the row where the most zeros are. In the array can be present only ones or zeros. Here is my code, but the program does not work correctly. Help me to understand where I made a mistake.
var i,j,n,m,max,l:integer; A:array [1..100,1..100] of integer; begin readln(n); readln(m); for i:=1 to n do begin for j:=1 to m do begin read(A[i,j]); if A[i,j]=0 then l:=l+1; if l > max then max:=i; end; end; writeln(max); end.
read(A[i,j])
not? - kot-da-vinci