
fortran程序出现错误,错误 1 error #5082: Syntax error, found IDENTIFIER 'C' when expecting one of:
realh,copen(unit=10,file='C:\soft\Drag\Drag.dat')read(10,*)hif(h<5)thenc=(18/h)endifp...
real h,c
open(unit=10,file='C:\soft\Drag\Drag.dat')
read(10,*)h
if(h<5) then c=(18/h)
end if
print *, '干扰阻力系数=', c
end
错误 1 error #5082: Syntax error, found IDENTIFIER 'C' when expecting one of:
大神们帮帮我吧 展开
open(unit=10,file='C:\soft\Drag\Drag.dat')
read(10,*)h
if(h<5) then c=(18/h)
end if
print *, '干扰阻力系数=', c
end
错误 1 error #5082: Syntax error, found IDENTIFIER 'C' when expecting one of:
大神们帮帮我吧 展开
3个回答
展开全部
if(h<5) then c=(18/h)
是不是这句错了,fortran中应该没有<>号的
应该改成
IF(H.LT.5)THEN C=(18/H)
fortran中不区分大小写,建议看一下fortran语法,谢谢
因为你的文件不存在,所以没法调用运行,不知道是不是这里错了
是不是这句错了,fortran中应该没有<>号的
应该改成
IF(H.LT.5)THEN C=(18/H)
fortran中不区分大小写,建议看一下fortran语法,谢谢
因为你的文件不存在,所以没法调用运行,不知道是不是这里错了
展开全部
real h,c
c=0
open(unit=10,file='C:\soft\Drag\Drag.dat')
read(10,*)h
if(h<5) then c=(18/h)
print *, '干扰阻力系数=', c
end
!c 没有初始化吧!
c=0
open(unit=10,file='C:\soft\Drag\Drag.dat')
read(10,*)h
if(h<5) then c=(18/h)
print *, '干扰阻力系数=', c
end
!c 没有初始化吧!
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
if(h<5) then
c=(18/h)
then 后要换行
c=(18/h)
then 后要换行
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询