Hi all
I've been asked to write a C++ program that the user enters a five digit integer.
The program then needs to return how many zeros in the number, how many odd numbers and how many even numbers.
I've set it up to %2=0 and %2!=0 to determine if the number is odd or even.
I don't know how to separate the odds and evens.
Any help would be great.
Thanks
Ian
Ian Woodgate 0 Newbie Poster
profyou 13 Newbie Poster
Ancient Dragon commented: good answer :) +14
ModernC++ 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
ModernC++ commented: If I don't use at least one function/class from boost (at least STL) in 50 lines of code I may explode +0
ModernC++ 0 Newbie Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
phani1092 0 Newbie Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Ian Woodgate 0 Newbie Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
profyou 13 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.