Write a program in c to input a 5 digit number and print it
in words.
Answers were Sorted based on User's Feedback
Answer / 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 |
Where is c used?
How can you increase the allowable number of simultaneously open files?
What is a program flowchart and explain how does it help in writing a program?
Write a program to find the biggest number of three numbers in c?
Explain what is the benefit of using #define to declare a constant?
Why we use break in c?
How do I access command-line arguments?
enum day = { jan = 1 ,feb=4, april, may} what is the value of may? a)4 b)5 c)6 d)11 e)none of the above
Which is an example of a structural homology?
p*=(++q)++*--p when p=q=1 while(q<=6)
What is string in c language?
Explain what math functions are available for integers? For floating point?