Mod Calculation : Mod « Language Basics « VB.Net

Mod Calculation

Mod Calculation
Imports System

Public Class MainClass

    Shared Sub Main(ByVal args As String())
       Dim counter As Integer

       For counter = 1 To 100
          Console.Write("{0} ", counter)

          ' every tenth value, display a tab and the value
          If counter Mod 10 = 0 Then
             Console.WriteLine(vbTab & counter)
          End If

       Next counter

    End Sub
End Class


Related examples in the same category

1.Mod OperatorMod Operator