老是出現各種錯誤,我已經不知道怎么改了,也查了好久百度,求解惑。
代碼如下
program main
implicit none
real::x,y
read*,x
if(x.GT.-15.and.x.LT.0) then y=COS(x)
else
if(x.GE.0.and.x.IT.10) then y=LOG(x**2+1)
else
if(x.GT.15.and.x.IT.20) then y=x**(1/3)
else print*,'其他'
END IF
print*,'y=',y
end
uj5u.com熱心網友回復:
program mainimplicit none
real::x,y
read*,x
if(x.GT.-15.and.x.LT.0) then y=COS(x)
else
if(x.GE.0.and.x.LT.10) then y=LOG(x**2+1)
else
if(x.GT.15.and.x.LT.20) then y=x**(1/3)
else print*,'其他'
END IF
print*,'y=',y
end
其中有兩個字母輸錯了,但除此之外還是有錯誤
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/109043.html
標籤:基礎類
上一篇:救救孩子
