Write a program in c to input a 5 digit number and print it
in words.
Answer Posted / vignesh1988i
#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;
like this print upto case 0 , (ie) after case 9 ... put
case 0.... and finish the switch and close the loop.......
| Is This Answer Correct ? | 119 Yes | 186 No |
Post New Answer View All Answers
provide an example of the Group by clause, when would you use this clause
printf(), scanf() these are a) library functions b) userdefined functions c) system functions d) they are not functions
Write a c program to demonstrate character and string constants?
Can include files be nested?
Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.
Write a program to check armstrong number in c?
what is uses of .net
Which is an example of a structural homology?
Where register variables are stored in c?
What is scanf () in c?
What is nested structure in c?
What is an lvalue in c?
Explain goto?
Is it acceptable to declare/define a variable in a c header?
What is the use of in c?