Integer: add, subtract, multiply and divide : Integer « Data Types « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Date Time
8.Development
9.Event
10.File Directory
11.Generics
12.GUI
13.Internationalization I18N
14.Language Basics
15.LINQ
16.Network Remote
17.Reflection
18.Security
19.Thread
20.Windows Presentation Foundation
21.Windows System
22.XML
23.XML LINQ
VB.Net » Data Types » IntegerScreenshots 
Integer: add, subtract, multiply and divide
Integer: add, subtract, multiply and divide
   
Imports System

Public Class MainClass
    Shared Sub Main()
        'Declare variable
        Dim intNumber As Integer

        'Set number, add numbers, and display results
        intNumber = 16
        'intNumber = intNumber + 8
        intNumber += 8
        System.Console.WriteLine("Addition test... " & intNumber)

        'Set number, subtract numbers, and display results
        intNumber = 24
        'intNumber = intNumber - 2
        intNumber -= 2
        System.Console.WriteLine("Subtraction test... " & intNumber)

        'Set number, multiply numbers, and display results
        intNumber = 6
        'intNumber = intNumber * 10
        intNumber *= 10
        System.Console.WriteLine("Multiplication test... " & intNumber)

        'Set number, divide numbers, and display results
        intNumber = 12
        'intNumber = intNumber / 6
        intNumber /= 6
        System.Console.WriteLine("Division test... " & intNumber)
    End Sub

End Class

           
         
    
    
  
Related examples in the same category
1.Compare Integer value and output their relationCompare Integer value and output their relation
2.Integer Initialize and assignmentInteger Initialize and assignment
3.Integer calculationInteger calculation
4.Define and use Array IntegerDefine and use Array Integer
5.And, Or, Xor and Not on Integer And, Or, Xor and Not on Integer
6.Integer Value DemoInteger Value Demo
7.Concatenate string and intConcatenate string and int
8.Append Integer data type values to a StringBuilder object.
9.Generic and nongeneric versions of the CompareTo method for Int16 value
10.Generic and nongeneric versions of the CompareTo method for Int32 value
11.Generic and nongeneric versions of the CompareTo method for Int64 value
12.Use the Sign(Integer) method to determine the sign of an Integer value and display it to the console.
13.Byte Structure Represents an 8-bit unsigned integer.
14.Convert Integer to Byte with CByte
15.Convert Integer to Byte with Convert
16.Parse a negative integer value
17.Int32 Structure Represents a 32-bit signed integer.
18.Integer variables
19.Int32 CompareTo Method
20.Int32 Equals Method
21.Int32.MaxValue Field Represents the largest possible value of an Int32. This field is constant.
22.Int32.Parse Method Converts string to 32-bit signed integer equivalent.
23.Int32.Parse Method (String, NumberStyles) Converts string to 32-bit signed integer equivalent.
24.Int32 Structure Represents a 32-bit signed integer.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.