473,386 Members | 1,741 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

c program to convert numbers between 1 and 99999

help me to solve the following program in shortest form....

Write a program to output any number between 1 and 99999 and output it in words.

For example: If the number is 213 then it should output "Two hundred and thirteen"
Feb 24 '08 #1
4 2006
Please read the rules, we don't just give.
Show us what you've attempted so far.
Feb 24 '08 #2
hsn
237 100+
your problem is very similer to me i did read it before in an ACM contest.
you really have to think about it. it is not so hard and i am sure you did read it from an ACM contest

good luck
Feb 24 '08 #3
weaknessforcats
9,208 Expert Mod 8TB
How do you know that 213 is two hundred and thirteen ???

Maybe of you wrote on paper how you got from 213 to two hundred and thirteeen, you could just code the steps in C.
Feb 24 '08 #4
hsn
237 100+
i will give you some hints.
use arrays to store the strings
and look what is commen when you between the numbers when you transfer them to string
Feb 25 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: lallous | last post by:
Hello, This code works fine when 'size' is less than 32768 however when size is bigger this function never returns. Can't find out why?! If I break into the code I can see that 'i' is 32768.......
14
by: 1111111111 | last post by:
Write a program that will do the following; Ask user to enter a FIVE DIGIT integer (from 11111 to 99999) Separate the number into its individual digits and Print the digits separated from one...
6
by: LTO | last post by:
What is going on with MS VC compiler team? The following trivial program will give wrong answer of 9 instead of 10. Perhaps MS is spending too much time on managed world and forget about the real...
5
by: andreas | last post by:
Hi, I have to investigate many decimal numbers if they are integral or not and I know that max =99999,999.. What I do is : str = cStr(numbD) If str.length <= 5 then ... I wonder if this is...
22
Frinavale
by: Frinavale | last post by:
How To Use A Database In Your Program Many .NET solutions are database driven and so many of us often wonder how to access the database. To help you understand the answer to this question I've...
5
by: RyanL | last post by:
I'm a newbie! I have a non-delimited data file that I'd like to convert to delimited. Example... Line in non-delimited file: 0139725635999992000010100534+42050-102800FM-15+1198KAIA Should...
13
by: Thomas Neubauer | last post by:
Hello, i am learning c# and have created now a simple project that just creates 6 random numbers. My form includes a button and 6 labels for the random numbers. The program seems to work...
1
by: astrogirl77 | last post by:
I'm new to C++ and am hoping to find help with coding a simple C program, am wanting to obtain code and functioning exe's. I code in an old version of Visual Basic 4.0, I have a simple app that...
10
by: len | last post by:
I have created the following program to read a text file which happens to be a cobol filed definition. The program then outputs to a file what is essentially a file which is a list definition...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.