VB.Net/Language Basics/Mod
Версия от 16:40, 26 мая 2010; (обсуждение)
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
Mod Operator
Imports System
public class MainClass
Shared Sub Main()
Dim counter As Integer
For counter = 1 To 100
Console.Write("{0} ", counter)
If counter Mod 10 = 0 Then
Console.WriteLine(vbTab & counter)
End If
Next counter
End Sub
End Class