+ 2
Hey guys! Need help with this. Been trying for quite sometime now but still not getting it. Thanks!
Write a program in C++ that can convert a given integer value into words. Assume the largest value to be 999 billion. For an input of say 1108, your output should be ONE THOUSAND ONE HUNDRED AND EIGHT
2 Réponses
+ 1
Might my Python code helps you
This code can convert any number to words upto range 10**125 ,including decimals.
Thank You 😊
https://code.sololearn.com/cyhnHulrwtk3/?ref=app
0
1 way u can create array/vector of string and each containing value of ones/tenths/hundredths/etc for each number
eg :
vector{"",""twenty","thirty"}
then u can map the integer with the vector based on the integer's length
i just give u a basic idea,try implement it by urself