473,396 Members | 1,940 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,396 software developers and data experts.

how to convert number into words in c++

i hd got a question to display the entered number ie any number to words in c++...??? say for eg: if we enter 10225,
thn it would display ten thousand two hundred and twenty five on the screen.....
if anyone knws the answer pls reply
thnx
Feb 22 '12 #1

✓ answered by weaknessforcats

Say you have 123. Ten 123/100 is 1. So you have one hundred.
Subtract 1* 100 from 23 to get 23.

Repeat the above using 23/10. Which is 2. So you have twenty.
Subtract 2 * 10 from 23 which leaves 3.

3 is three.

You can do this in a loop.

Good luck.

2 2709
weaknessforcats
9,208 Expert Mod 8TB
Say you have 123. Ten 123/100 is 1. So you have one hundred.
Subtract 1* 100 from 23 to get 23.

Repeat the above using 23/10. Which is 2. So you have twenty.
Subtract 2 * 10 from 23 which leaves 3.

3 is three.

You can do this in a loop.

Good luck.
Feb 22 '12 #2
bt sir...we have to done the program with an array......
can u pls demonstrate the program for me...???
Feb 26 '12 #3

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

Similar topics

0
by: ZSP747 | last post by:
Now,I prepare to write a English-Chinese dictionary.So I want find a function or library can convert the words from one form to another,such as "boys"->"boy","became->become","went"->"go"....
5
by: ZSP747 | last post by:
Now,I prepare to write a English-Chinese dictionary. So I want find a function or library can convert the words from one form to another,such as "boys"->"boy","became->become","went"->"go"....
1
by: vhormaza | last post by:
Hello. Have some body a function to convert a number in the alphabetical expression?, for example-. 1500 = Mil Quinientos (in spanish)
2
by: mktilu | last post by:
hi can any one tell do we have any function to convert number to text.For example 25 to be converted to twenty five in SQL
2
by: nineballssj9 | last post by:
#include <stdio.h> #include <string.h> #include <math.h> //i'm trying to convert number into word like for an example if i type //99.99 then it will print ninety nine point ninety nine //can...
3
by: richard143 | last post by:
is any body could help me??????? convert the number to words????? plsssssssssssssss.........
6
by: maminx | last post by:
hello... i have this situation, i want to convert the number format like example "350", become string format "three hundred and fifty".. Is it anyone who has the library to convert the number...
1
by: Rohullah | last post by:
Hello I want to convert emp table sal column to word form for every row in emp table. how to do it. iam traing this code but it doesnt work i dont know why. on when-new-form-instance...
9
by: korea saeed | last post by:
how can i convert number string to number?(without using parsint)
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.