ex0502.f90
来自「Fortran95的一些有用的源程序」· F90 代码 · 共 20 行
F90
20 行
program ex0502
implicit none
real(kind=4) :: height ! 记录身高
real(kind=4) :: weight ! 记录体重
write(*,*) "height:"
read(*,*) height ! 读入身高
write(*,*) "weight:"
read(*,*) weight ! 读入体重
if ( weight > height-100 ) then
! 如果体重大于身高减去100, 会执行下面的程序
write(*,*) "Too fat!"
else
! 如果体重不大于身高减去100, 会执行下面的程序
write(*,*) "Under control."
end if
stop
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?