Expand the program by adding another function


Discuss the below:

Q: Expand the program by adding another function that asks the user his/her age. Output both last name and age in the Main procedure.

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

Solution Preview :

Prepared by a verified Expert
Visual Basic Programming: Expand the program by adding another function
Reference No:- TGS01938623

Now Priced at $25 (50% Discount)

Recommended (91%)

Rated (4.3/5)