Write a program that reads in three zip codes from standard input
and writes to standard output a single integer and nothing else.
The integer it prints out is the number of duplicates in the
sequence of zip codes. Thus, it will print out 0, 1 or 2:
0 is printed if each zip code is unique.
1 is printed if only two of the zip codes are the same.
2 is printed if all three are the same.
So, if the input to the program is
11210 11217 10003
then the output would be:
------------------------------...
0
------------------------------...
But, if the input to the program is
11210 11210 11210
then the output would be:
------------------------------...
2
------------------------------...
okay, this isn't working out for me, it always comes out as incorrect, whether i use string, char, or whatever. PLEASE help. (remember its C++)
2006-10-09
16:09:06
·
1 answers
·
asked by
who cares
1
in
Programming & Design