code181a.txt

来自「VB大全(精华版)源代码」· 文本 代码 · 共 11 行

TXT
11
字号
Public Function Round_Up(ByVal ToBeRounded As Double) As Double
  Round_Up = Int(ToBeRounded) + 1
End Function

Public Sub Main()
  Debug.Print "The Round_Up of 1.9 is: ", Round_Up(1.9)
  Debug.Print "The Round_Up of 2.1 is: ", Round_Up(2.1)
  Debug.Print "The Round_Up of -2.1 is: ", Round_Up(-2.1)
  Debug.Print "The Round_Up of -2.9 is: ", Round_Up(-2.9)
End Sub

⌨️ 快捷键说明

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