i need answer for this Q is that how we can write program in C++ to eccept any number and print it with its digit? and thanx^^
rashad fares 0 Newbie Poster
Recommended Answers
Jump to Postcin and cout would be a fair start.
Jump to Postx % 10 will return the right most digit, for example if x = 15 then x%10 will return 5. Now put that in a loop, divide x by 10, to get all the digits
All 7 Replies
Suzie999 245 Coding Hobbyist
rashad fares commented: !!!how? +0
vmanes 1,165 Posting Virtuoso
rashad fares 0 Newbie Poster
rashad fares 0 Newbie Poster
rashad fares 0 Newbie Poster
NathanOliver 429 Veteran Poster Featured Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured 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.