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 are categories used for in c?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
What are the disadvantages of a shell structure?
Write a code to generate divisors of an integer?
What is wrong with this initialization?
Why is sizeof () an operator and not a function?
Explain what are bus errors, memory faults, and core dumps?
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
What is infinite loop?
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
What is the function of volatile in c language?
What are header files and what are its uses in C programming?
What are lookup tables in c?
What is a structural principle?
What is time complexity c?