VB.Net/Language Basics/Mod — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 12:42, 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