Imports System
Public Class Program
Public Shared Function roundDownToNearest10(ByVal num As Double) As Double
Return Math.Floor(num / 10) * 10
End Function
Public Shared Sub Main()
Console.WriteLine(roundDownToNearest10(33))
Console.WriteLine(roundDownToNearest10(59))
Console.WriteLine(roundDownToNearest10(599.99))
Console.WriteLine(roundDownToNearest10(3.14))
Console.WriteLine(roundDownToNearest10(2))
Console.WriteLine(roundDownToNearest10(19))
Console.WriteLine(roundDownToNearest10(-12))
Console.WriteLine(roundDownToNearest10(-101))
Console.WriteLine(roundDownToNearest10(-109))
End Sub
End Class
' run:
'
' 30
' 50
' 590
' 0
' 0
' 10
' -20
' -110
' -110
'