主题:求高手帮看下
implicit none
integer i,n
real a(20),b(20),c(20),h(20),y(20),x(20),D(20),K(20),qa(20)
real t,z,r1,r2
real,parameter::e=2.7128
read*,n,t,z
qa(0)=0.28
D(0)=138.2131
K(0)=1.4843927E-02
h(0)=5.9560733E-03
a(0)=0
x(0)=-1
b(0)=D(0)/z
c(0)=-b(0)
y(0)=h(0)/b(0)
r1=t/(z**2)
r2=t/(2*z)
do i=1,n
qa(i)=(y(i-1)-qa(i-1))/x(i-1)
D(i)=1671.8*((qa(i)/0.462)**4.978)
K(i)=(2.7E-8)*(e**(47.3*qa(i)))
a(i)=-r1*D(i-1)
c(i)=-r1*D(i)
b(i)=1-(a(i)+c(i))
h(i)=qa(i)-r2*(K(i)-K(i-1))
y(i)=(h(i)-a(i)*y(i-1))/(b(i)-a(i)*x(i-1))
x(i)=c(i)/(b(i)-a(i)*x(i-1))
qa(n)=(h(n)-a(n)*y(n-1))/(b(n)-a(n)*x(n-1))
print*,qa(i)
end do
end
运行不出来 各位给点意见啊
n=20 t=1 z=2
integer i,n
real a(20),b(20),c(20),h(20),y(20),x(20),D(20),K(20),qa(20)
real t,z,r1,r2
real,parameter::e=2.7128
read*,n,t,z
qa(0)=0.28
D(0)=138.2131
K(0)=1.4843927E-02
h(0)=5.9560733E-03
a(0)=0
x(0)=-1
b(0)=D(0)/z
c(0)=-b(0)
y(0)=h(0)/b(0)
r1=t/(z**2)
r2=t/(2*z)
do i=1,n
qa(i)=(y(i-1)-qa(i-1))/x(i-1)
D(i)=1671.8*((qa(i)/0.462)**4.978)
K(i)=(2.7E-8)*(e**(47.3*qa(i)))
a(i)=-r1*D(i-1)
c(i)=-r1*D(i)
b(i)=1-(a(i)+c(i))
h(i)=qa(i)-r2*(K(i)-K(i-1))
y(i)=(h(i)-a(i)*y(i-1))/(b(i)-a(i)*x(i-1))
x(i)=c(i)/(b(i)-a(i)*x(i-1))
qa(n)=(h(n)-a(n)*y(n-1))/(b(n)-a(n)*x(n-1))
print*,qa(i)
end do
end
运行不出来 各位给点意见啊
n=20 t=1 z=2