hello sir..
I am not being able to make a program that accepts any number and displays it in words....
for example: when user enter 3456 then output should be three thousand four hundred fifty six.... 12 then print twelve.....9 then print nine...and so on....
varun mca
0
Newbie Poster
Recommended Answers
Jump to PostFirst of all you didn't show any work,
the rule is that "you show the work and we help you with it"
it would be nice if you give it a go, and lets see where you get stuck.
Jump to PostI'd be tempted to use a small 2D word array:
powr[] array: [0]="teen" [1]="ty" [2]="hundred" [3]="thousand" etc. wrd[] array: 0="zero" 1="one" 2="two" etc.
and this might easily change. I'm not familiar with this exercise.
and put together the string answer, from big to small number values:
…
All 5 Replies
Software guy
6
Junior Poster
varun mca
0
Newbie Poster
Adak
419
Nearly a Posting Virtuoso
Adak
419
Nearly a Posting Virtuoso
varun mca
0
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.