Exercise
Age
Objetive
Write a Visual Basic (VB.Net) program to ask the user for their age (e.g. 20) and respond with something like "You look younger than 20" (the age entered by the user should be displayed in place of "20").
Code
' Import the System namespace to use Console class
Imports System
Public Class Program
' Main subroutine, entry point of the program
Public Shared Sub Main()
' Ask the user to input their age
Console.Write("Please enter your age: ")
' Read the user's input and convert it to an integer
Dim age As Integer = Convert.ToInt32(Console.ReadLine())
' Respond with a message based on the user's age
Console.WriteLine("You look younger than " & age)
End Sub
End Class