In this exercise, we learn how to write a C Program to print the two digit number in words?. We will write the C Program to print the two digit number in words using switch cases. How to display number in words using loop in C programming. Write a C program to input a two digit number from the user and print it into words using for loop. Logic to print two digit number in words in C programming.
The program consists of two outer switch statements. The first switch statement prints the word for the first digit and the second switch case statement print the word for the second digit.
In first switch case, we have used another nested switch case to handle the numbers from 11 to 19 because require some trick to print these numbers.
Output:
Enter a two-digit number: 11
need an explanation for this answer? contact us directly to get an explanation for this answerYou have entered: eleven