232k views
3 votes
write a Visual Basic program that asks the user to enter their favourite colour and then displays the message "good choice" if they say "green" and the message "bad choice" otherwise.​

User Frauke
by
3.7k points

1 Answer

5 votes

Answer:

Module Module1

Sub Main()

Dim choice As String

Console.WriteLine("What is your favorite color?")

choice = Console.readline()

if choice == "green" Then

Console.WriteLine("Bad choice!")

Else

Console.WriteLine("Good choice!")

End Sub

End Module

User Alekhine
by
3.6k points