ex1101.f90
来自「Fortran 95程序设计【彭国伦】第11章」· F90 代码 · 共 34 行
F90
34 行
module bank
implicit none
private money
public LoadMoney, SaveMoney, Report
integer :: money = 1000000
contains
subroutine LoadMoney(num)
implicit none
integer :: num
money=money-num
return
end subroutine
subroutine SaveMoney(num)
implicit none
integer :: num
money=money+num
return
end subroutine
subroutine Report()
implicit none
write(*,"('银行目前库存',I,'元')") money
end subroutine
end module
program ex1101
use bank
implicit none
call LoadMoney(100)
call SaveMoney(1000)
call Report()
stop
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?