can...u...convert..words..2..no..?????like..if..we enter three it should display 3???????????

Salem commented: Learn to write English, not script kiddie puke -1

Recommended Answers

All 4 Replies

you would either have to create a lookup table or use some other kind of construct (like switch/case)... there are no standard library functions to perform the string to number conversion.

for large numbers, you would have to tokenize the string and create a number for each string individually.

>can...u...convert..words..2..no..?????
Yes, though the inverse is easier due to formatting constraints. It's not a trivial problem, but it's also not overly difficult. What have you tried?

can u cr8 me program that words converted to numbers.(1-50) using switch. pls help me.

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.