Visual Basic: Combining Two Input Fields
November 5th, 2022
Please help with the following problem. I’m lost in where to enter the other function to combine the two fields to prompt the user for last and firs name.
The problem is given below:
Expand the program by adding another function that asks the user his/her age. Output both last name and age in the Main procedure. (Paste your code below)
Module Module1
Sub Main()
Dim lastname As String
lastname = GetName()
Console.Write(“Your last name is ” & lastname)
Console.ReadLine()
End Sub
Public Function GetName() As String
Dim name As String
Console.Write(“Input your last name? “)
name = Console.ReadLine()
Return name
End Function
End Module