Imports System
Public Module Module1
Public Sub Main()
Dim arr() As Single = {5.01, 5.5, 0.14, -0.14, -9.01, -9.6}
Console.WriteLine(" Value ceiling Floor")
For Each n As Single In arr
Console.WriteLine("{0,7} {1,9} {2,12}", n, Math.Ceiling(n), Math.Floor(n))
Next
End Sub
End Module
' run:
'
' Value ceiling Floor
' 5.01 6 5
' 5.5 6 5
' 0.14 1 0
' -0.14 0 -1
' -9.01 -9 -10
' -9.6 -9 -10
'