Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 1st, 2007, 6:52 AM   #1
james24587
Newbie
 
Join Date: Oct 2007
Posts: 3
Rep Power: 0 james24587 is on a distinguished road
Question HELP: I need a C program that converts words into numbers and vice versa

Hi guys,

HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Can anyone send me source code of a single C program that converts words into numbers and numbers into words, eg:

Input: 156
Output: one hundred fifty six

Input: twenty two thousand eighty nine
Output: 22089

I've searched for ages and can't find any source code that does this!


Cheers,
James
james24587 is offline   Reply With Quote
Old Oct 1st, 2007, 7:44 AM   #2
avinashmalipatil
Newbie
 
Join Date: Sep 2007
Posts: 14
Rep Power: 0 avinashmalipatil is an unknown quantity at this point
There r built in functions to convert numeric data to alpha and vicever.
char *itoa(int value, char *string, int radix); converts intiger to char
int atoi( const char *str ); converts char to int.
These functions are defined in stdlib.h.
avinashmalipatil is offline   Reply With Quote
Old Oct 1st, 2007, 7:57 AM   #3
james24587
Newbie
 
Join Date: Oct 2007
Posts: 3
Rep Power: 0 james24587 is on a distinguished road
I'm a complete novice at C...

I'm looking for source code of a single C program that does this.


Cheers,
James
james24587 is offline   Reply With Quote
Old Oct 1st, 2007, 8:24 AM   #4
Jabo
Not a user?
 
Join Date: Sep 2007
Posts: 230
Rep Power: 1 Jabo is on a distinguished road
what's the going price on single programs?
Jabo is offline   Reply With Quote
Old Oct 1st, 2007, 9:12 AM   #5
avinashmalipatil
Newbie
 
Join Date: Sep 2007
Posts: 14
Rep Power: 0 avinashmalipatil is an unknown quantity at this point
if u want a single program then U can do this
fun_conv(char *str, int *num, int flag)
{
if(flag==0)
convert int to string using function itoa
else
convert string to int using fun atoi
}

U can find the description of these functions in help menu of compiler or from internet..
U have to do some homework... U cannot expect entire code...
avinashmalipatil is offline   Reply With Quote
Old Oct 1st, 2007, 9:15 AM   #6
james24587
Newbie
 
Join Date: Oct 2007
Posts: 3
Rep Power: 0 james24587 is on a distinguished road
I need a whole C program that does this.

I am unable to write it myself,

any website links to source code or anyone who has previously written source code that does this would be much apprecitated
james24587 is offline   Reply With Quote
Old Oct 1st, 2007, 9:50 AM   #7
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
This is a help forum, not a free homework/work factory. You should put this in the Job Offers forum.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Oct 1st, 2007, 11:14 AM   #8
peace_of_mind
Professional Programmer
 
peace_of_mind's Avatar
 
Join Date: Sep 2004
Location: Hell if I know most of the time
Posts: 435
Rep Power: 4 peace_of_mind is on a distinguished road
Send a message via MSN to peace_of_mind Send a message via Yahoo to peace_of_mind
Pointless thread reported.
__________________
Amateurs built the ark
Professionals built the Titanic

peace_of_mind is offline   Reply With Quote
Old Oct 1st, 2007, 11:47 AM   #9
Wizard1988
Professional Programmer
 
Wizard1988's Avatar
 
Join Date: Oct 2005
Location: Chitown
Posts: 414
Rep Power: 3 Wizard1988 is on a distinguished road
Send a message via AIM to Wizard1988
Why aren't you able to do it yourself? Ask your instructor for help if you do not understand it. NO ONE will do your work for you, thats just the real world.
__________________
JG-Webdesign
Wizard1988 is offline   Reply With Quote
Old Oct 1st, 2007, 2:23 PM   #10
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,613
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
Moved to the Job Offer forum since you are unwilling to try to attempt this yourself. We are not here to give you code, if you need help with code you have written that doesn't work, we can help you get it right.
__________________
BIG K aka Kyle
Programming Forums
Kyle K Online

Please do not PM or email me programming questions. Post them in the forums instead.
big_k105 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:47 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC