473,425 Members | 1,668 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,425 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 2011
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.