Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program V;
- var
- a : array [1..1000, 1..1000] of real;
- j, i, n : integer;
- max, sum : real;
- begin
- ReadLN(n);
- for i:= 1 to n do begin
- for j:= 1 to n do
- Read(a[i,j]);//считываем массив
- ReadLN();// для переноса строки
- end;
- sum:= 0;//сумма строки
- for j:= 1 to n do
- sum := sum + a[1, j];//первая строка для инициализации ...
- max:= sum;//...максимума
- for i:= 2 to n do
- begin
- sum:= 0;
- for j:= 1 to n do
- sum := sum + a[i, j];
- if (sum > max)then
- max:= sum;
- end;
- WriteLN(max);
- end.
Add Comment
Please, Sign In to add comment