Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a program in c to input a 5 digit number and print it
in words.

Answer Posted / vignesh1988i

#include<stdioi.h>
void main()
{
int n,count=0,a[20];
scanf("%d",&n);
for(i=0;n>0;i++)
{
a[i]=n%10;
n=n/10;
count++;
}
for(i=0;i<count;i++)
{
switch(a[i])
{
case 1:
printf("one");
break;
case 2:
printf("two");
break;
like this print upto case 0 , (ie) after case 9 ... put
case 0.... and finish the switch and close the loop.......

Is This Answer Correct ?    119 Yes 186 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

provide an example of the Group by clause, when would you use this clause

2246


printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions

1217


Write a c program to demonstrate character and string constants?

2247


Can include files be nested?

1162


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

1322


Write a program to check armstrong number in c?

1180


what is uses of .net

1787


Which is an example of a structural homology?

1378


Where register variables are stored in c?

1002


What is scanf () in c?

1172


What is nested structure in c?

1117


What is an lvalue in c?

1181


Explain goto?

1207


Is it acceptable to declare/define a variable in a c header?

1179


What is the use of in c?

1085