Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions

Question

Were the right people involved in the decision-making process?

Answered: 1 week ago

Question

How to reverse a Armstrong number by using double linked list ?

Answered: 1 week ago