Question about Borland Turbo C++ Suite 1.0 (TCB0000WWFS180) for PC

# Write a program that accept a number and output its equivalent in words.

Posted by on

• Level 2:

An expert who has achieved level 2 by getting 100 points

MVP:

An expert that gotĀ 5 achievements.

Governor:

An expert whose answer gotĀ voted for 20 times.

Hot-Shot:

An expert who has answered 20 questions.

• Expert

Below is the program written in Turbo C.

#include<stdio.h>
void pw(long,char[]);
char *one[]={" "," one"," two"," three"," four"," five"," six"," seven","
eight"," Nine"," ten"," eleven"," twelve"," thirteen"," fourteen","
fifteen"," sixteen"," seventeen"," eighteen"," nineteen"};
char *ten[]={" "," "," twenty"," thirty"," forty"," fifty"," sixty","
seventy"," eighty"," ninety"};

void main()
{
long n;
clrscr();
printf("
Enter any 9 digit no: ");
scanf("%9ld",&n);
if(n<=0)
printf("Enter numbers greater than 0");
else
{
pw((n/10000000),"crore");
pw(((n/100000)%100),"lakh");
pw(((n/1000)%100),"thousand");
pw(((n/100)%10),"hundred");
pw((n%100)," ");
}
getch();
}

void pw(long n,char ch[])
{
(n>19)?printf("%s %s ",ten[n/10],one[n%10]):printf("%s ",one[n]);
if(n)printf("%s ",ch);
}

Posted on Aug 06, 2010

×

• Level 1:

An expert who has achieved level 1.

• Contributor

P=11 q=13 e=11 calculate n . d

Posted on Jan 19, 2011

## 1 Suggested Answer

Hi there,
Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this issue over the phone in a minute or two.

Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.

Here's a link to this great service

Good luck!

Posted on Jan 02, 2017

×

my-video-file.mp4

Complete. Click "Add" to insert your video.

×

## Related Questions:

### I WOULD LIKE TO KNOW EQUIVELENT OF TDA9340PS/N3/A/1923

If you enter the IC number into Google you can find places that have the original model, so why would you want an equivalent?

Feb 11, 2014 | LG 47LB9DF LCD TV, 47 ViewabImage Size,...

### Write a program that accept a number and output its equivalent in word

Use the value that will be printed by the keyboar.
After you enter the value.
You have to cast the type you have used as integer or float into string or character type.
So here the type casting of the datatype will be used.

Oct 10, 2011 | Borland Turbo C++ 4.5 Full Version for PC

### Hi my printer will not print. it is saying printer spool error.

> spool error

S.P.O.O.L. == Simultaneous Peripheral Output On Line

The "spool" is a combination of disk-space on your 'C:' drive, and software to "accept" the print-image (as fast as MS Word can create the print-image), and save the print-image to disk-space,
so that MS Word can report "print completed", so that you can use MS Word, instead of waiting until the physical printing has completed.

Then, the printer-spooling software will read from the print-image file, and send it to the printer, only as fast as the printer will accept it.

Feb 05, 2011 | Xerox Office Equipment & Supplies

### Hey i m using Apple i dnt hv office in my laptop so can i use Microsoft word online .

You can download OpenOffice, which is compatible with Microsoft Word. Its free! And you can get all the other MS compatible office programs, as well as a Word equivalent.

http://newopenoffice2010.com/

Apr 06, 2010 | Microsoft Office Word 2003 for PC

### My new acer aspire will not accept the product number for word. I am using the trial, but bought the program cd. I figured all I needed to do was put the product number in, but keeps saying it is typed...

You have to install the CD version. Go to add/remove programs and uninstall the trial version first, then install the CD version and you should be good to go. This will not affect any data that you've created using the software (documents and such).

Feb 13, 2010 | Acer Aspire One Netbook 8.9" Notebook

### Please Solve this C++ Program

Write a program to prompt the user to input several lines of input. A line of inputs is terminated by '*'. For each readline of input the program should output:(use pointer notation for the array) . The total # of words . The lenght of the longest word in the line At the end the program should output: . The total number of words read in all lines of input . The lenght of the longest word read in all lines of input

Jan 19, 2009 | Computers & Internet

### Source code for word count

Haha, i wrote one of thee a while ago for a competition. You need to us e the char at function mate :D
Inside a for loop
Ill havea look for you though :D

Sep 09, 2008 | ArcMedia JavaScript Source Code 3000 Pro...

### Plz give me C code for the given program

I have the code in java. can you convert.
if need
mail to p.stivel@gmail.com

Feb 23, 2008 | Computers & Internet

#### Related Topics:

1,239 people viewed this question

## Ask a Question

Usually answered in minutes!

Level 3 Expert