Program 1 - VB
Program 1 - VB
Module Data_type
Sub Main()
Dim b As Byte = 1
Dim si As Single
Dim db As Double
Dim c As Char
b=1
num = 20
si = 0.12
db = 2131.787
get_date = Today
c = "A"
Console.WriteLine("Welcome ")
End Sub
End Module
Output:
Welcome
Byte is: 1
Character is: 1
b. Sub Main()
Dim x As Integer = 15
Dim y As Integer = 3
' Output: x + y = 18
' Output: x - y = 12
' Output: x * y = 45
' Output: x / y = 5
' Output: x \ y = 5
End Sub
End Module
Module operators
Sub Main()
Dim x As Integer = 10
Dim y As Integer = 12
'Output: x = y is False
Console.WriteLine("x = y is:{0}", x = y)
End Sub
End Module
Module operators
Sub Main()
'Output: x or y is True
Console.WriteLine("x or y is:{0}", x Or y)
End Sub
End Module