FORTRAN 90 的format语句怎么用?这是我的代码:print "(26x,2x,2x,2x,'英语')"100 format(输入第 位同学4门课的成绩:',t7,i1\)write (*,100) 1read (*,'(f4.1,2x,f4.1,2x,f4.1,2x,f4.1)'),a1,a2,a3,a4write (*,100) 2read(*,'(f4.1,2x,f4.1,2x,f4.1,2x,f4.1)') b1,b2,b3,b4write (*,100) 3read(*,'(f4.1,2x,f4.1,2x,f4.1,2x,f4.1)') c1,c2,c3,c4avera1=.25*(a1+a2+a3+a4)avera2=.25*(b1+b2+b3+b4)avera3=.25*(c1+c2+c3+c4)print "(15x,2x,2x,2x,'英语',2x,'总成绩',2x,'平均成绩')"print "('第1位同学成绩:',f4.1,2x,f4.1,2x,f4.1,2x,

问题描述:

FORTRAN 90 的format语句怎么用?
这是我的代码:
print "(26x,2x,2x,2x,'英语')"
100 format(输入第 位同学4门课的成绩:',t7,i1\)
write (*,100) 1
read (*,'(f4.1,2x,f4.1,2x,f4.1,2x,f4.1)'),a1,a2,a3,a4
write (*,100) 2
read(*,'(f4.1,2x,f4.1,2x,f4.1,2x,f4.1)') b1,b2,b3,b4
write (*,100) 3
read(*,'(f4.1,2x,f4.1,2x,f4.1,2x,f4.1)') c1,c2,c3,c4
avera1=.25*(a1+a2+a3+a4)
avera2=.25*(b1+b2+b3+b4)
avera3=.25*(c1+c2+c3+c4)
print "(15x,2x,2x,2x,'英语',2x,'总成绩',2x,'平均成绩')"
print "('第1位同学成绩:',f4.1,2x,f4.1,2x,f4.1,2x,f4.1,2x,f5.1,x,f4.1)",a1,a2,a3,a4,4*avera1,avera1
end
format语句不应该这么用吗?怎么有语法错……