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 to swap two number with using third variable
- C Program to find the factorial of the number
- C Program to check whether the number is Palindrome or not
- C Program to swap two number without using Third variable
- C Program to display Fibonacci in c using for loop
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:
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