### Author Topic: solve this problem please? it serves as my project can you help me?  (Read 2954 times)

0 Members and 1 Guest are viewing this topic.

#### ac1006

• Beginner
• Posts: 3
##### solve this problem please? it serves as my project can you help me?
« on: August 10, 2008, 03:15:41 AM »
the problem goes like this..........

Make a program that can convert number  "1" to number "one" do it until "3000",
if it is above 3000 display "out of range"

the output will be this:

press any number below 3000 : 215

result : two hundred fifteen

#### airman00

• Contest Winner
• Supreme Robot
• Posts: 3,650
• narobo.com
##### Re: solve this problem please? it serves as my project can you help me?
« Reply #1 on: August 10, 2008, 05:40:36 AM »
Hello,

I had a similar program in my speech recognition for Chives , my butler robot, when I wanted him to say the current temperature out loud. I didn't want to record numbers from 1 - 100 because that was too annoying. Instead you do the following :

Code: [Select]
`Get the raw number ( e.g. 250)Divide up the number into its components ( 200 , 50 , 0 )Now you just speak 200, then 50 , then skip zero and say nothing `
Please note you have to program exceptions to this rule , like numbers between 10 and 19.  You would have to manually record those , since eleven follows no rule. But from 14 to 19 , you could say the singles digit ( four ) and then the tens digit ( teen ) .

For the above 3000 thing thats simple, just a simple IF THEN statement

What  programming language are you using and is this for PC or microcontroller?
Check out the Roboduino, Arduino-compatible board!