Use 10 numbers instead of 20. Go with the ouput. Use a one-dimensional array to
ID: 3617848 • Letter: U
Question
Use 10 numbers instead of 20. Go with the ouput.
Use a one-dimensional array to solve the following program: Read in 20 numbers,each of which is between 10 and 100, inclusive. As each number isread in, validate
it and store it in the array only if it is not a duplicate of anumber already read.
After reading all the values, display only the unique values thatthe user has
entered.
Output:
Enter 10 integers between 10 and 100:
1
Invalid number.
4
Invalid number.
1999
Invalid number.
11
12
13
14
19
11
Duplicate number.
22
12
Duplicate number.
23
345
Invalid number.
45
46
47
The non duplicate values are:
11 12 13 14 19 22 23 45 46 47
Explanation / Answer
please rate - thanks #include using namespace std; int main() {int upto=0,j,num; int nums[20]; bool found; while(uptoRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.