tayber | Дата: Четверг, 11.12.2014, 16:19 | Сообщение # 1 |
Рядовой
Группа: Пользователи
Сообщений: 1
Статус: Offline
| Program Task_5; const n = 3; m = 3; var A:array[1..n,1..n]of integer; i,j:byte; k, s1, s2, s3, max:integer; begin for j:=1tondo for i:=1tondo begin write('ВведитеA(',i,',',j,'):'); readln(A[i,j]); end; For i:=1 tondo For j:=1tondo if j=1thens1:=s1+A[i,j]; if j=2thens2:=s2+A[i,j]; if j=3thens3:=s3+A[i,j]; if (s1>s2)and (s1>s3) then max:=s1; if (s2>s1)and (s2>s3) then max:=s2; if (s3>s1)and (s3>s2) then max:=s2; writeln ('Суммаравна ', max); end.
|
|
| |