Const N = 20; Var A:array[1..N] of integer; i,k:integer; Begin Randomize; k:=0; For i:= 1 to N do Begin A[i]:=random(201)-100; Write(A[i],' '); if Abs(A[i]) mod 10 = 4 then k:=k+1 End; WriteLn; WriteLn('k = ',k); End.
Var i, k: integer; var arr: array[0..19] of integer; begin for i := 0 to 19 do read(arr[i]); for i := 0 to 19 do if arr[i] mod 10 = 4 then k := k + 1; writeln(k); end.