Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
C
DIMENSION A(3,6), AI(3,3) DATA AI/1,2,4,2,1,-2,-3,0,5/ PRINT*,'MATRIX A' WRITE(6,*) PRINT 20, ((AI(I,J),J=1,3),I=1,3) 20 FORMAT(3X,3F8.2//) DO I=1,3 DO J=1,6 IF(J.LE.3)THEN A(I,J)=AI(I,J) ELSE IF(J.EQ.I+3)THEN A(I,J)=1.0 ELSE A(I,J)=0.0 ENDIF ENDIF ENDDO ENDDO PRINT*,'AUGMENTED MATRIX' WRITE(6,*) PRINT 10, ((A(I,J),J=1,6),I=1,3) 10 FORMAT(3X,6F8.2//) DO 7 I=1,3 IF(A(I,I).NE.0.0)THEN P=A(I,I) ELSE PRINT*,'PIVOT ELEMENT IS ZERO' STOP ENDIF DO JJ=1,6 A(I,JJ)=A(I,JJ)/P ENDDO DO 3 J=1,3 IF(J.EQ.I)GOTO 3 COM=A(J,I) DO K=1,6 A(J,K)=A(J,K)-A(I,K)*COM ENDDO 3 CONTINUE 7 CONTINUE WRITE(6,*) PRINT*,'AUGMENTED ECHELON MATRIX' WRITE(6,*) PRINT 11,((A(I,J),J=1,6),I=1,3) 11 FORMAT(3X,6F8.2//) DO I=1,3 DO J=4,6 K=J-3 AI(I,K)=A(I,J) ENDDO ENDDO WRITE(6,*) PRINT*,'INVERSE OF MATRIX A' WRITE(6,*) PRINT 30, ((AI(I,J),J=1,3),I=1,3) 30 FORMAT (3X, 3F8.2//) END
run
|
edit
|
history
|
help
0
Ashish.txt
Practice 4(I) recently
Gauss pivot elimination
A_01 SECANT_METHOD
A_01 CHEBYSHEV_METHOD
gauss seidel and jacobi
A_01 NEWTON_R_M(B(I))
A_03 1(I)
Chebyshev practice
Comparison of three numbers