Home
Source Codes
Engineering Colleges

Training  Reports
Seminar Reports
Placement Papers

Forums

   Computer Science / IT
   Electronics
   Electrical
   Mechanical
   Chemical
   Civil

   CAT / MBA

   GMAT / Foreign MBA
Latest Jobs

Engineering Jobs / Technical Jobs
Management Jobs

Sitemap
Terms of use

Displaying  Source Code(s)  
 

 
To Convert an no. entered by the user (digits can be

--------------------------------------------------------------------------------

Description : This Program takes the no. entered by the user as an string String is converted into a series of int type arrays.The main Objective is to tackle digits greater than 12.Special attention has been given to commas & fullstop used to separate words

Code:

#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<stdio.h>
int fchar=0;
char
ones[22][22]={"zero","one","two","three","four","five","six","seven","eigh
t","nine","ten",<BR>eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","e
ighteen","nineteen"};
char
first[22][22]={"Zero","One","Two","Three","Four","Five","Six","Seven","Eig
ht","Nine","Ten",<BR>Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","E
ighteen","Nineteen"};
char
tens[10][10]={"twenty","thirty","fourty","fifty","sixty","seventy","eighty<BR>,"ninety"};
char
sec[10][10]={"Twenty","Thirty","Fourty","Fifty","Sixty","Seventy","Eighty"
,"Ninety"};
char tenz[10][10]={"hundred","thousand","million","billion"};
void fun2(long);
void main()
{
clrscr();
char string[50];
textbackground(BLUE);
textcolor(GREEN);
long i,j;
long m=1;
long n[10]={0,0,0,0,0,0,0,0,0,0},no;
cout<<"Enter the no. ";
cin>>string;
for(i=0;string[i]!='
 

 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved © copyright 123ENG