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
I need a sort of an approximate strcmp routine?
What is methods in c?
What is the code in while loop that returns the output of given code?
an expression contains relational operators, assignment operators, and arithmatic operstors. In the absence of parentheses, they will be evaluated in which of the following order a) assignment, relational, arithematic b) arithematic, relational, assignment c) relational, arithematic, assignment d) assignment, arithematic, relational
Is fortran faster than c?
Explain void pointer?
can anyone suggest some site name..where i can get some good data structure puzzles???
What is an lvalue in c?
What is pointers in c with example?
What is s or c?
What is void c?
Explain how do you declare an array that will hold more than 64kb of data?
How to delete a node from linked list w/o using collectons?
What is variable in c example?
What is the heap in c?