write a c program to accept a given integer value and print
its value in words
Answer Posted / uday
#include<stdio.h>
int main()
{
int n;
clrscr();
printf("\nenter a integer number::");
scanf("%d",&n);
switch(n)
{
case:1
printf("\nOne");
break;
case:2
printf("\nTwo");
break;
case:3
printf("\nThree");
break;
case:4
printf("\nFour");
brak;
case:5
printf("\nFive");
break;
case:6
printf("\nSix");
break;
case:7
printf("\nSeven");
break;
case:8
printf("\nEight");
break;
case:9
printf("\nNine");
break;
default:
printf("\nSorry");
}
getch();
}
| Is This Answer Correct ? | 19 Yes | 41 No |
Post New Answer View All Answers
Why functions are used in c?
Explain what is a 'locale'?
Can we change the value of constant variable in c?
I came across some code that puts a (void) cast before each call to printf. Why?
Which is better pointer or array?
How can you check to see whether a symbol is defined?
What is a good data structure to use for storing lines of text?
Explain About fork()?
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 define directive?
exit () is used to a) exit () terminates the execution of the program itself b) exit () terminates the execution of the loop c) exit () terminates the execution of the block d) none of the above
Using which language Test cases are added in .ptu file of RTRT unit testing???
Can main () be called recursively?
What are the storage classes in C?
When was c language developed?