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,

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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

 

### Integer Input Process and Unique Value Identification

The process of inputting and identifying unique integer values can be exemplified by the following text-based interface interaction:

#### Input Interaction:
- **Please enter an integer value: 0**
- **Please enter an integer value: 45**
- **Please enter an integer value: 65**
- **Please enter an integer value: 92**
- **Please enter an integer value: 7**

#### Output:
- **Unique Values Entered:**
  - `0 45 65 92 7`

### Explanation:

In this interaction, users are prompted to enter integer values. Each entered value is recorded, and at the end of the session, the unique integer values (without repetition) are displayed. The resulting output lists the set of distinct integers provided during the input phase. 

This process is crucial for applications that require user input validation and filtration, ensuring that only unique entries are processed or stored.
Transcribed Image Text:### Integer Input Process and Unique Value Identification The process of inputting and identifying unique integer values can be exemplified by the following text-based interface interaction: #### Input Interaction: - **Please enter an integer value: 0** - **Please enter an integer value: 45** - **Please enter an integer value: 65** - **Please enter an integer value: 92** - **Please enter an integer value: 7** #### Output: - **Unique Values Entered:** - `0 45 65 92 7` ### Explanation: In this interaction, users are prompted to enter integer values. Each entered value is recorded, and at the end of the session, the unique integer values (without repetition) are displayed. The resulting output lists the set of distinct integers provided during the input phase. This process is crucial for applications that require user input validation and filtration, ensuring that only unique entries are processed or stored.
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education