[問題] 執行這段程式後 為什麼會跳出T=0?
DISPERSION PROGRAM
C 1-D, EXPLICIT SCHEME
real C(182),F(182),CN(182),E(182),Z,ZNDA
+DX,DT,K
integer INDX
c DIMENSION
C OPEN (5, FILE='A5.DAT', STATUS='NEW')
OPEN (6, FILE='A6.OUT', STATUS='OLD')
C READ(5,*) DX, DT, K
DX=1.0
DT=1.0
K=0.1
WRITE(6,*) INDX, I, DX, DT, K
INDX=0
20 DO 40,I=1,9
C(I)=0
40 CONTINUE
C(5)=10
DX=1.0
DT=1.0
K=0.1
ZNDA=K*DT/(DX)**2
A=-ZNDA
110 B=1+2*ZNDA
Z=-ZNDA
130 WRITE(*,*)"t=",INDX
INDX=INDX+1
E(2)=0
F(2)=C(1)
DO 210, I=3,9
D=C(I)
E(I)=-0.1/(A*E(I-1)+B)
F(I)=(D-A*F(I-1))/(A*E(I-1)+B)
210 CONTINUE
220 DO 250,I=1,7
J=9-I
CN(J)=E(J+1)*C(J+1)+F(J+1)
250 CONTINUE
DO 280,I=1,9
C(I)=CN(I)
280 CONTINUE
cc WRITE(*,*)"t=",INDX
290 IF(MOD (INDX+60,60).NE.0)GO TO 220
WRITE(1,*)(C(I),I=2,8)
310 IF(INDX.LT.1440)GO TO 110
STOP
END
按CTRL+F5執行之後
它跳出t=0
並且下面也跳出 forrtl: error (200): program aborting due to control-C event
請問我會是哪一段寫錯Q_Q
請各位高手、大俠幫忙
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 125.230.80.155
※ 文章網址: http://www.ptt.cc/bbs/Fortran/M.1417539987.A.97A.html
→
12/03 11:54, , 1F
12/03 11:54, 1F
→
12/08 09:35, , 2F
12/08 09:35, 2F
推
12/08 14:58, , 3F
12/08 14:58, 3F
→
12/08 14:58, , 4F
12/08 14:58, 4F
Fortran 近期熱門文章
PTT數位生活區 即時熱門文章