Write a program that reads in ten numbers and displays the number of distinct numbers and the distinct numbers separated by exactly one space (i.e., if a number appears multiple times, it is displayed...


Write a program that reads in ten numbers and displays the number of distinct numbers and<br>the distinct numbers separated by exactly one space (i.e., if a number appears multiple times,<br>it is displayed only once). (Hint:Read a number and store it to an array if it is new. If the number<br>is already in the array, ignore it. While solving the question please use an array.) After the<br>input, the array contains the distinct numbers. Here is the sample run of the program:<br>Enter ten numbers: 1 2 3 21634 5 2<br>The number of distinct number is 6.<br>The distinct numbers are: 123645<br>

Extracted text: Write a program that reads in ten numbers and displays the number of distinct numbers and the distinct numbers separated by exactly one space (i.e., if a number appears multiple times, it is displayed only once). (Hint:Read a number and store it to an array if it is new. If the number is already in the array, ignore it. While solving the question please use an array.) After the input, the array contains the distinct numbers. Here is the sample run of the program: Enter ten numbers: 1 2 3 21634 5 2 The number of distinct number is 6. The distinct numbers are: 123645

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here