Integer Calculation


public class Test
public Shared Sub Main
Dim n As Integer

‘ try adding numbers…
n = 16
n += 10.23
Console.WriteLine(“Addition ” & n)

‘ try subtracting numbers…
n = 24
n -= 2
Console.WriteLine(“Subtraction ” & n)

‘ try multiplying numbers…
n = 6
n *= 10
Console.WriteLine(“Multiplication ” & n)

‘ try dividing numbers…
n = 12
n /= 6
Console.WriteLine(“Division ” & n)

End Sub
End class

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s