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
What is a loop?
Can you write the function prototype, definition and mention the other requirements.
What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25
Explain why can’t constant values be used to define an array’s initial size?
hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...
What does return 1 means in c?
What is sizeof int in c?
What is pointer in c?
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none
What are reserved words?
What is exit() function?
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above
Where static variables are stored in memory in c?
How do you use a pointer to a function?
the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none