⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ans0503.f90

📁 这是fortran95第五章的课后答案
💻 F90
字号:
program main
  implicit none
  integer age, money
  real tax

  write(*,*) "请输入年龄"
  read(*,*) age
  write(*,*) "请输入月收入"
  read(*,*) money

  if ( age<50 ) then
    if ( money<1000 ) then
	  tax = 0.03
	else if ( money<5000 )then
	  tax = 0.10
	else
	  tax = 0.15
	end if
  else
    if ( money<1000 ) then
	  tax = 0.5
	else if ( money<5000 )then
	  tax = 0.7
	else
	  tax = 0.10
	end if
  end if
  
  write(*,"(' 税金为 'I8)") nint(money*tax)

end program

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -