C Program using Switch case to enter a digit (0-9) and write in words | C Program to accept single digit number and print it in words|E-studyblog

 C Program using Switch case to enter a digit (0-9) and write  in words |C Program to accept single digit number and print it in words|E-studyblog 


In this Program, you will get knowledge about C Program using Switch case to enter a digit (0-9) and write  in words.


C Program using Switch case to enter a digit (0-9) and write  in words
C Program to accept single digit number and print it in words

C Program using Switch case to enter a digit (0-9) and write  in words:


#include <stdio.h>
void  main()
{
   int choice;

   printf("Enter your choice in Digits from 0 - 9 : ");
   scanf("%d",&choice);
   switch(choice)
   {
	 case 0:
	       printf("\nZero");
	       break;
 
	 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("\nInvalid choice ");
	       break;
      }
}



Output:

C Program using Switch case to enter a digit (0-9) and write  in words

C Program using Switch case to enter a digit (0-9) and write  in words

I hope you have read our Article " C Program using Switch case to enter a digit (0-9) and write  in words"and  you have collected lots of information from there.If you like the post,then please comment and share among your friends and family. you can write your opinion about my post in the comment box. 


Thank you!

No comments:

Post a Comment

If you have any queries ,please let us know

C Program to Check whether the number is Even or Odd|how to find odd and even numbers in c programming|E-studyblog

I n this Article, you will learn how to   Check  whether the number is  Even or odd. We have shared the source code of odd and even number i...