answersLogoWhite

0

write a c program which reads an integer value from the keyboard then it displays the number in words?

#include<stdio.h>

#include<conio.h>

void main(void)

{

int rev,n,

clrscr();

printf("\n enter any number");

scanf("%d",&n);

temp=n;

while(n>0)

{

rem=temp%10;

rev+=rem*10;

temp=temp/10;

choice=rev%10;

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();

}

User Avatar

Wiki User

13y ago

What else can I help you with?