Pages

Friday 5 July 2013

VB 11 Tutorial 7: Getting Started

VB 11 Tutorial 7: Getting Started

If you have not yet learnt about Loops and For Statements Please refer to Tutorial 6: Here

Today we will be learning how to use maths in VB



Code:

' Example of Maths

Module SubNew

Sub Main()
Dim X As Double = 4
Dim Y As Double = Math.Pi

Console.WriteLine(X * Y + X / X >> Y * (X + 1)) ' You do maths inside string, if the Variables are all the same type other wise you have to case Example.
Console.WriteLine(Cint("1") + 1)

End Sub

End Module

No comments:

Post a Comment