求各位大神帮忙看看这是出了问题。。。感谢感谢
点击“启动”会报错
点击“编译”会出现图片所示
代码也放上来了(初学菜鸡路过)
[Fortran] 纯文本查看 复制代码 program ex0524
implicit none
integer age
real pay,tax
write(*,*)"Your age?"
read(*,"(I3)")age
write(*,*)"Pay?"
read(*,*)pay
select case(age)
case(0:49)
if(pay>=5000)then
tax=pay*0.15
else if(pay>=1000)then
tax=pay*0.1
else if(pay>=0)then
tax=pay*0.03
else
write(*,*)"WRONG PAY!!!"
stop
end if
case(50:)
if(pay>=5000)then
tax=pay*0.1
else if(pay>=1000)then
tax=pay*0.07
else if(pay>=0)then
tax=pay*0.05
else
write(*,*)"WRONG PAY!!!"
stop
end if
case default
write(*,*)"WRONG AGE!!!"
stop
end case
write(*,*)"Your tax is",tax
read(*,*)
end
|