Visual Basic: Combining Two Input Fields
Not what you're looking for?
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
Purchase this Solution
Solution Summary
This solution helps with a problem regarding combining two input fields in a visual basic program.
Solution Preview
Here you go. This solution be very easy to understand.
Sub Main()
Dim lastname As String, age As Integer
lastname = GetName()
Console.Write("Your last ...
Purchase this Solution
Free BrainMass Quizzes
Inserting and deleting in a linked list
This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.
Basic Networking Questions
This quiz consists of some basic networking questions.
C++ Operators
This quiz tests a student's knowledge about C++ operators.
Basic Computer Terms
We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.
Basic UNIX commands
Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.