Question: ( Print distinct integers ) Write a java program that reads in 1 0 integers and displays the number of distinct integers and the distinct
Print distinct integers
Write a java program that reads in integers and displays the number of distinct integers and the distinct integers in their input order and separated by exactly one space ie if a number appears multiple times, it is displayed only once
Hint: Read an integer and store it to an array if it is new. If the integer is already in the array, ignore it
After the input, the array contains the distinct integers. Here is a sample run:
Sample Run
Enter ten numbers:
The number of distinct number is
The distinct numbers are
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
