hello guys i got a simple project but not that simple at the same time. lol The user needs to input a number such as : 512 and the code needs to output the number but in letters(five hundread and twelve). Any tips? :)
jhonnyboy 1 Junior Poster in Training
Recommended Answers
Jump to PostHere's a small tutorial on the switch statement
Jump to Poststring number;
It's giving me a hard time when i try to convert the string into an integer for the converting. Don't know what to do :(
Why did you declare 'number' as a string anyway? If you just declare it as an int, you won't have to …
Jump to PostHow about making your own function to check how many digits a number has:
(you've shown some effort, so you'll get a freebie :) )
int HowManyDigits(int input) { long div=1, digits=1; while (input/div > 1) { digits++; div*=10; } return digits; } int main() { …
All 11 Replies
vmanes 1,165 Posting Virtuoso
mahlerfive 23 Junior Poster in Training
raul15791 27 Junior Poster
jhonnyboy 1 Junior Poster in Training
Nick Evan 4,005 Industrious Poster Team Colleague Featured Poster
raul15791 27 Junior Poster
dougy83 74 Posting Whiz in Training
jhonnyboy 1 Junior Poster in Training
Nick Evan 4,005 Industrious Poster Team Colleague Featured Poster
jhonnyboy 1 Junior Poster in Training
Nick Evan 4,005 Industrious Poster 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.