Write a program in c to input a 5 digit number and print it
in words.
Answer Posted / siddiqui_1985
i dont have answer i'm actually asking question..
What if we want to print upto nth term??
in a very first post
"
#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;
"
he explicitly doing this using switch case.
| Is This Answer Correct ? | 6 Yes | 5 No |
Post New Answer View All Answers
Explain how can you restore a redirected standard stream?
What is strcmp in c?
What is a pragma?
What is difference between array and structure in c?
What is the explanation for prototype function in c?
Explain what is operator promotion?
What does char * * argv mean in c?
Explain what will be the outcome of the following conditional statement if the value of variable s is 10?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }
What is an identifier?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
What is a nested loop?
What does %c do in c?
Explain how can you tell whether a program was compiled using c versus c++?
What is a #include preprocessor?