How to calculate the remainder in VB.NET

1 Answer

0 votes
Imports System

Module Module1

   	Sub Main()
		Dim a As Integer = 18
		Dim b As Integer = 5

		Dim r As Integer = a Mod b   ' r = 2

		Console.WriteLine("Remainder = " & r)
    End Sub

End Module


	
' run:
'
' Remainder = 3
'

 



answered Mar 4 by avibootz
...