+ 10
Getting the scale - converting numbers to words
join replace string segment anyone know how i would go about joining and/or replacing parts of a string. sort of like a spell checker? I was thinking that I would just do a spell check type of deal maybe to sort out fivety and ten one results from the final output string https://code.sololearn.com/cuQzlPRBZNUX/#cpp Any ideas?
3 ответов
+ 3
Use a dictionary
+ 3
😀 But will I have to store every possible combination of numbers that would contain a ten or a teen? (50, 16 etc). Assume you are talking about std::map?
I said fivety earlier as I was just putting ty in the 10's power of my code and it was outputting fivety, threety and stuff and then after it had got all the words I was going to spell check. To replace those words with the correct versions.
Since then I was thinking of another approach but havent done anything cause I sorta lost motivation on this one
+ 1
an answer! my saviour!