get 5 unique values from the user and store them in the member variable loop to get the numbers, if a number is already stored, ignore it and keep looping until you have 5 unique numbers if a number is out of range,

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter4: The Selection Structure
Section: Chapter Questions
Problem 5MQ9
icon
Related questions
Question
100%

C# program in Visual Studio Code. I need to be able to enter five integer values and then have the Unique values entered display. 

  • Private member variable to store 5 unique values (hint: use an Array or a List)
  • Public function to get 5 unique values from the user and store them in the member variable
    • loop to get the numbers, if a number is already stored, ignore it and keep looping until you have 5 unique numbers
    • if a number is out of range, don't store the value, throw an exception and handle it in such a way that you don't break the loop but do message the user that the value was out of range

 

Please enter an integer
Please enter an integer
value: 0
value: 45
value: 65
Please enter an integer
Please enter an integer value: 92
Please enter an integer value: 7
Unique Values Entered:
0 45 65 92 7
Transcribed Image Text:Please enter an integer Please enter an integer value: 0 value: 45 value: 65 Please enter an integer Please enter an integer value: 92 Please enter an integer value: 7 Unique Values Entered: 0 45 65 92 7
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Methods of StringBuilder class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,