老是出现各种错误,我已经不知道怎么改了,也查了好久百度,求解惑。
代码如下
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