Write a program in c to input a 5 digit number and print it
in words.
Answer Posted / sachin patel
#include<stdio.h>
#include<conio.h>
void main()
{
int no;
printf("Enter the no");
scanf("%d",&no);
switch(no)
{
case 1:
printf("One");
break;
case 2:
printf("Two");
break;
case 3:
printf("Three");
break;
case 4:
printf("Four");
break;
case 5:
printf("Five");
break;
case 6:
printf("Six");
break;
case 7:
printf("Seven");
break;
case 8:
printf("Eight");
break;
case 9:
printf("Nine");
break;
default:
printf("You entered Wrong input");
break;
}
}
| Is This Answer Correct ? | 8 Yes | 5 No |
Post New Answer View All Answers
What is meant by inheritance?
Is there sort function in c?
What is a function in c?
Is there a way to compare two structure variables?
What do you mean by dynamic memory allocation in c?
What does volatile do?
What is a newline escape sequence?
in case any function return float value we must declare a) the function must be declared as 'float' in main() as well b) the function automatically returned float values c) function before declared 'float' keyword d) all the above
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
Is main a keyword in c?
What is logical error?
What is the process to create increment and decrement stamen in c?
What is ambagious result in C? explain with an example.
What is sizeof in c?
why do some people write if(0 == x) instead of if(x == 0)?