Answer to Question #14308 in C++ for Emma Dominico

Question #14308
Write a program that asks an integer number and display the number in words in C PROGRAMMING.
1
Expert's answer
2012-09-07T10:37:33-0400
#include<stdio.h>
#include<conio.h>
void main(void)
{
int rev,n,
clrscr();
printf("
enter any number");
scanf("%d",&n);
temp=n;
while(n>0)
{
rem=temp;
rev+=rem*10;
temp=temp/10;
choice=rev;
switch(choice)
{
case 1:
printf("one");
break;
case 2:
printf("two");
break;
case 3:
printf("three");
break;
case 4:
printf("four");
break;
case 5:
print("five");
break;
case 6:
printf("six");
break;
case 7:
printf("seven");
break:
case 8:
printf("eight");
break:
case 9:
printf("nine");
}
getch();

}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS