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
What is c mainly used for?
What are identifiers c?
write a c program for swapping two strings using pointer
What kind of structure is a house?
What is c token?
What is the benefit of using #define to declare a constant?
please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................
in linking some of os executables are linking name some of them
What are the different types of endless loops?
What is meant by gets in c?
How do you print an address?
Explain void pointer?
What does the && operator do in a program code?
Subtract Two Number Without Using Subtraction Operator
C language questions for civil engineering