Question: 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.,
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).

J Enter Enter ten numbers: 1 2 3 2 1 6 3 4 5 2 The number of distinct number is 6 The distinct numbers are: 1 2 3 6 4 5
Step by Step Solution
3.17 Rating (172 Votes )
There are 3 Steps involved in it
Program Plan Define the class name PrintDistinctNumbers o Define the main method Declare the re... View full answer
Get step-by-step solutions from verified subject matter experts
