听到我的初始代码:
PROGRAM ROW ECHELON
INTEGER, DIMENSION (3,3):: A
INTEGER I,J
然后我们向用户询问值。
PRINT*,"Enter the elements for your 3x3 matrix."
DO I=1,3
DO J=1,3
READ*,A(I,J)
ENDDO
ENDDO
DO I=1,3
PRINT*,(A(I,J),J=1,3)
ENDDO
PRINT*
PRINT*,"Now, we have to transform it to its row-echelon form."
PRINT*
IF (A(1,1)==1) THEN
PRINT*,"We'll retain the first row since its first element is 1."
PRINT*
ELSEIF (A(1,1)/=1) THEN
PRINT*,"Are there any other rows whose 1st element is 1? Press 1."
READ*,x
ENDIF
IF (x==1) THEN
GO TO 1
ENDIF
1 IF (A(2,1)==1) THEN
然后我不知道该怎么做。
请帮忙。