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


Please Help Members By Posting Answers For Below Questions

What is a loop?

560


Can you write the function prototype, definition and mention the other requirements.

670


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

1500


Explain why can’t constant values be used to define an array’s initial size?

867


hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...

1455






What does return 1 means in c?

591


What is sizeof int in c?

613


What is pointer in c?

749


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

721


What are reserved words?

662


What is exit() function?

568


in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above

641


Where static variables are stored in memory in c?

528


How do you use a pointer to a function?

642


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

654