PARAMETER(N=3)
DIMENSION A(N,N)
READ*,((A(I,J),J=1,N),I=1,N)
SUMU=0.0
SUML=0.0
SUMD=0.0
DO 7 I=1,N
DO 10 J=1,N
IF(I.LT.J)SUMU=SUMU+A(I,J)
IF(I.GT.J)SUML=SUML+ A(I,J)
IF(I.EQ.J)SUMD=SUMD+ A(I,J)
10 CONTINUE
7 CONTINUE
PRINT*,'Sum of elements above main diagonal=',SUMU
PRINT*,'Sum of elements below main diagonal=',SUML
PRINT*,'Sum of elements in the main diagonal=',SUMD
STOP
END
UEFSQU1FVEVSKE49MykKRElNRU5TSU9OIEEoTixOKQpSRUFEKiwoKEEoSSxKKSxKPTEsTiksST0xLE4pClNVTVU9MC4wClNVTUw9MC4wClNVTUQ9MC4wCkRPIDcgST0xLE4KRE8gMTAgSj0xLE4KSUYoSS5MVC5KKVNVTVU9U1VNVStBKEksSikKSUYoSS5HVC5KKVNVTUw9U1VNTCsgQShJLEopCklGKEkuRVEuSilTVU1EPVNVTUQrIEEoSSxKKQoxMCBDT05USU5VRQo3IENPTlRJTlVFClBSSU5UKiwnU3VtIG9mIGVsZW1lbnRzIGFib3ZlIG1haW4gZGlhZ29uYWw9JyxTVU1VClBSSU5UKiwnU3VtIG9mIGVsZW1lbnRzIGJlbG93IG1haW4gZGlhZ29uYWw9JyxTVU1MClBSSU5UKiwnU3VtIG9mIGVsZW1lbnRzIGluIHRoZSBtYWluIGRpYWdvbmFsPScsU1VNRApTVE9QCkVORA==