answersLogoWhite

0

The simplest solution is to use a std::set<size_t> sequence container to store the values as they are input. Duplicate entries are ignored automatically, thus when all 5 numbers have been input, the set will have at least 1 number but no more than 5. Thus the size of the set represents the count of distinct values that were input.

User Avatar

Wiki User

10y ago

What else can I help you with?

Related Questions

Create a program which accepts a number not less than 10The program prints the reverse of the number?

ten


Are tongue prints the same?

No, like fingerprints, tongue prints are unique to each individual. The large number of papillae on the tongue (bumps and ridges) create a distinct pattern that can be used for identification purposes.


When typing letters on the keyboard seemingly randomly prints some letters and numbers?

a number lock is on


A program prints vertically a numbers in c program?

It is too easy................ //Program to print numbers vertically #include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int last_no; int i; clrscr(); i=0; printf("Enter your last num.I will print 0 to that number"); scanf("%d",&amp;last_no); printf("\n"); while(i&gt;last_no) { printf("%d\n",i); i++; } getch(); } //poo.papule


Write a program that read phrase and print the number of lower-case letter in it using function of counting?

write a program that reads a phrase and prints the number of lowercase latters in it using a function for counting? in C program


How do you write a program which reads a list of ten numbers and print the list in reserve order in c program?

The simplest way is probably to read the numbers into an array and then prints each element of the array starting at the last one and moving backwards.


Demonstrate a program that prints numbers in ascending order.?

#include&lt;iostream&gt; int main() { for (int i=0; i&lt;100; ++i) std::cout&lt;&lt;i&lt;&lt;std::endl; }


What is one tool for reverse engineering software and five features of that tool?

hexadecimal dumper, which prints or displays the binary numbers of a program in hexadecimal format.


How can you cross reference an engine serial number with a VIN number for a 97 Suzuki Marauder VZ 800?

SUZUKI PRINTS A PUBLICATION THAT CROSS REFERENCES VIN NUMBERS TO ENGINE NUMBERS. THEY ARE SENT TO DEALERS.


Can someone help me I need to write a C program which prints all even numbers between 3 and 50 or writes No Answer if there aren't such then it should repeat the same action for the odd numbers?

I've made the following program according to your question #include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main(void) { clrscr(); int a; printf("Enter your number\n"); scanf("%d",&amp;a); { if(a%2==0 &amp;&amp; a&gt;3 &amp;&amp;a&lt;50) { printf("This number is even %d",a); } else {printf("This number is not even"); } } getch(); }


How did menu's develop?

A restaurant prints it out using a special program


How to Write a c plus plus program to print number from 1 to 500?

#include using std::cout;using std::endl;int main(viod){cout