Question: Write a program that reads in ten numbers and displays the number of distinct numbers and the distinct numbers seperated by exactly one space. after

Write a program that reads in ten numbers and displays the number of distinct numbers and the distinct numbers seperated by exactly one space. after the input, the array contains the distinct numbers.

Should pop up only 10 dialog boxes each asking for one number and any number can be entered.

As a number is entered have the program loop through the array to determine if the number is already in the array. If it is you can ignore that number, if it is not add it to the array.

When all 10 numbers have been entered you then print out how many total distinct numbers were entered and then ONLY print the distinct numbers that were entered, (no duplicates).

Your program must also be able to handle whether zeros were entered. Don't print a zero if a zero was NOT entered in the dialog box and if a zero was entered only ONE should be printed out as a distinct number.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!