Question: in c++ please Write a complete program that reads three nonnegative integers from the console and outputs the number of distinct values entered. For example

in c++ please
in c++ please Write a complete program that reads three nonnegative integers

Write a complete program that reads three nonnegative integers from the console and outputs the number of distinct values entered. For example if the input is 345523 then the output will be 3 , since there are three distinct values. If the input is 427842 then the output will 2 aince there are two distinct values. Finally, if the input is 676767 then the output will be 1 since there is just one distinct value. Special case: If any of the integers is negative th en the output will be - 1 to signify an error

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!