VB_0003_Decision2
Module Module1
Sub Main()
'IF and ElseIf
Dim userValue As String
Console.WriteLine("Type your choices 1 or 2 or 3")
userValue = Console.ReadLine
If userValue = "1" Then
Console.WriteLine("You typed 1: You won the CAR")
Console.ReadLine()
ElseIf userValue = "2" Then
Console.WriteLine("You typed 2: You won the HOUSE")
Console.ReadLine()
ElseIf userValue = "3" Then
Console.WriteLine("You typed 3: You won the BIKE")
Console.ReadLine()
Else
Console.WriteLine("You have given wrong input")
Console.ReadLine()
End If
End Sub
End Module
Comments
Post a Comment