Re: [问题] 循环问题

楼主: kkarthur (aa)   2012-05-29 21:00:08
program test
INTEGER :: X,Y,I,J
X = 10
Y = 10
DO I = 1, X
DO J= 1, Y
IF(I==1 .OR. J==1 .OR. I==X .OR. J==X) THEN
WRITE(*,"(A)",ADVANCE="NO") "*"
ELSE
WRITE(*,"(A)",ADVANCE="NO") " "
END IF
END DO
WRITE(*,*)
END DO
end program test
作者: Wstyle (Astor)   2012-05-30 00:49:00
非常感谢~

Links booklink

Contact Us: admin [ a t ] ucptt.com