So I've finished a few more chapters of my Visual Basic 2005 How To Program book and I've done all of the end of chapter "practice" programs. I am stuck on one though. Here are the instructions :
Write a Visual Basic Console application that prompts the user for 10 whole numbers. If this number has not already been entered by the user, the program should store the value in an array. After 10 numbers have been entered, display a complete list of the unique numbers entered by the user.
NOTE: Be sure to provide for the worse case scenario, when your user enters 10 unique values.
Your program should be broken into at least the following methods:
* GetInput - this Function will read a number from the Console and return it
* WasNumberEntered - this Function will check through the array for the number and return True if it was entered or False if it wasn't.
* DisplayNumbers - this subroutine will display a list of unique values entered by the user
Although not required to look this way, your program output might look like:
Please enter 10 whole numbers:
Please enter a value: 4
Please enter a value: 2
Please enter a value: 6
Please enter a value: 5
Please enter a value: 2
Please enter a value: 5
Please enter a value: 2
Please enter a value: 5
Please enter a value: 2
Please enter a value: 5
The values you entered were:
4
2
6
5
Last edited by a moderator: