Write a program in c to input a 5 digit number and print it
in words.
Answers were Sorted based on User's Feedback
Answer / 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 |
What is the difference between variable declaration and variable definition in c?
how can i get output the following... 5 4 3 2 1 4 3 2 1 3 2 1 2 1 1 and 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 plz plz...
how to determine the complexity of an algorithm as log(n)
What is the difference between exit() and _exit() function?
What is main function in c?
How do you view the path?
When do you not use the keyword 'return' when defining a function a) Always b) Never c) When the function returns void d) dfd
What do you understand by normalization of pointers?
Explain the priority queues?
What is bash c?
Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?
What is class and object in c?