回 帖 发 新 帖 刷新版面

主题:请问我的这个程序对吗?能运行

问题
Y=0,  u=2*t
X=0,  u=3*t
X=762,  u=5*t
程序
Program main
Implicit none
Real x,y,t,u
Read(*,*)x,y
t=0.5
IF (y.eq.0) then
u=2*t
ELSE 
if (x.eq.0) then
u=3*t
else if (y.eq.0) then
u=5*t
end if
ENDIF
write(*,*)x,y,u

回复列表 (共2个回复)

沙发


IF (y.eq.0) then
else if (y.eq.0) then

矛盾

板凳


多谢

我来回复

您尚未登录,请登录后再回复。点此登录或注册