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

what value is returned to operating system after program execution?

2078


When was c language developed?

1154


Why array is used in c?

985


What is the purpose of scanf() and printf() functions?

1197


What is wild pointer in c?

1038


design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.

1940


What is storage class?

1026


Why is c not oop?

947


How do you declare a variable that will hold string values?

1130


Explain what is a program flowchart and explain how does it help in writing a program?

1067


How can I split up a string into whitespace-separated fields?

1025


What are near, far and huge pointers?

1027


Why shouldn’t I start variable names with underscores?

1028


Explain what is the benefit of using #define to declare a constant?

1124


How do I get an accurate error status return from system on ms-dos?

1092