Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for i:=1 to n do
- for j:=1 to n do begin
- if ((j = 4) AND (i = 1)) OR ((j = 3) AND (i = 2)) OR ((j = 2) AND (i = 3)) OR ((j = 1) AND (i = 4)) then
- k := k+1;
- sum := sum + matrix[i,j];
- end;
- end;
- for i:=1 to n do
- begin
- sum := sum + matrix[i,5-i];
- end;
Add Comment
Please, Sign In to add comment