C/C++

Помогите решить паскаль

Дана квадратная матрица порядка н. Составить программу вычисления
• количества четных элементов в нижнем левом треугольнике, включая диагональные элементы.
Igor Eidelberg
Igor Eidelberg
98
 uses crt; 
var j, k, l, m, n: integer;
a: array of array of integer;
begin
textbackground(white);
clrscr();
textcolor(magenta);
randomize();
write('n: ');
readln(n);
writeln();
setlength(a, n, n);
n := n - 1;
for l := 0 to n do
begin
for m := 0 to n do
begin
a[l,m] := random(199) - 99;
if l = m then textcolor(blue)
else textcolor(magenta);
write(a[l,m]: 4)
end;
writeln()
end;
k := 0;
for l := 0 to n do
for m := 0 to l do
if a[l,m] mod 2 = 0 then k := k + 1;
textcolor(green);
writeln();
writeln(k, ' even elements')
end.
АЮ
Артур Юнусов
66 572
Лучший ответ
Dim i As Integer, j As Integer, m As Integer, n As Integer Dim z As Integer, q As Integer Cells.Clear m = InputBox("Введите размер матрицы", , 6) For i = 1 To m For j = 1 To m n = Rnd() * 100 - 50 Cells(i, j) = n If i > j Then Cells(i, j).Font.Color = RGB(255, 0, 0) If n Mod 2 = 0 Then z = z + 1 Else q = q + 1 End If End If Next Next Cells(i + 2, 2) = "Число четных элементов = " & z Cells(i + 3, 2) = "Число нечетных элементов = " & q
Гарри )))))))))
Гарри )))))))))
5 981
Igor Eidelberg А можешь в паскаль?