Chat LIVE With Programming Experts! There Are 23 Online Right Now...

Welcome to Dream.In.Code
Become a C++ Expert!

Join 244,198 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,416 people online right now. Registration is fast and FREE... Join Now!




convert integer to string.....

 
Reply to this topicStart new topic

convert integer to string....., anyone help me....

supernatural
12 Dec, 2008 - 08:19 AM
Post #1

New D.I.C Head
*

Joined: 12 Dec, 2008
Posts: 1

can you tell me friend....
coding how to change integer to string....

example....

input : 10 2000 12.015.368

output : ten two thousand twelve milion fifteen thousand three hundred sisty eight

please......
i need help you...

sorry...
my english not too good....
thanx......

User is offlineProfile CardPM
+Quote Post


future_ahead
RE: Convert Integer To String.....
12 Dec, 2008 - 11:30 AM
Post #2

New D.I.C Head
*

Joined: 29 Nov, 2008
Posts: 9


My Contributions

inputstring : 10 2000 12.015.368

Going from left to right, you can parse inputstring to some segments. (Each segment is separated by character blank (" "). Then problem becomes that: how to read number A = y1y2y3y4...yn. (yi = 0,1,...,9)
You must define who is yi (i = 1,2,...,n), corresponding to position of yi in number A.
Then you attach "tail of xi" to xi.

For example: A = 2145
2 + thousand = two thousands
1 + hundred = one hundred
4 correspond to second position from right to left in A (4*10) => forty
5 = five
=> result: two thousands one hundred forty five
icon_up.gif rolleyes.gif

User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic

Time is now: 7/4/09 07:07AM

Live C++ Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month