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
Explain a pre-processor and its advantages.
Why is extern used in c?
Why structure is used in c?
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
What is the difference between functions abs() and fabs()?
How would you rename a function in C?
How can I make sure that my program is the only one accessing a file?
Is it possible to initialize a variable at the time it was declared?
What are pointers in C? Give an example where to illustrate their significance.
What is meant by int main ()?
Can a pointer be static?
Hi how many types of software editions are there and their difference (like home editions, enterprise, standard etc) can u please help me
What is echo in c programming?
What is string function in c?
Write a program to print factorial of given number without using recursion?