February 2022 0 7 Report
В какой строчке допущена ошибка в программе, написанной на языке PascalABC? Программа должна высчитывать сумму элементов, стоящих на побочной диагонали в квадратной матрице 6х6. 1) program diag;
2) var
3) mat:array[1..6,1..6] of integer;
4) i,j,s:integer;
5) begin
6) s:=0;
7) for i:=1 to 6 do
8) for j:=1 to 6 do
9) read(mat[i,j]);
10) for i:=1 to 6 do
11) for j:=1 to 6 do
12) if i=j then s:=s+ mat[i,j];
13) write('Сумма элементов, стоящих на побочной диагонали ’);
14) writeln(s);
15) end.
А) 12 Б) 14 В) 11 Г) 6
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Copyright © 2024 SCHOLAR.TIPS - All rights reserved.