How to print value of integers into words?

How to print value of integers into words?

Below i a program to solve given problem:

#include
int main()
{
   int n;
   clrscr();
   printf("\nEnter the integer number::");
   scanf("%d",&n);
   switch(n)
   {
      case:1
      printf("\nOne");
      break;
      case:2
      printf("\nTwo");
      break;
      case:3
      printf("\nThree");
      break;
      case:4
      printf("\nFour");
      break;
      case:5
      printf("\nFive");
      break;
      case:6
      printf("\nSix");
      break;
      case:7
      printf("\nSeven");
      break;
      case:8
      printf("\nEight");
      break;
      case:9
      printf("\nNine");
      break;
      default:
      printf("\nSorry");
}
getch();
} 

By:Vivek Kr. Agarwal
Date:2006-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related C Subjective Links

C Subjective interview questions and answers for experienced and fresher