C program to Print the Digits of a Number in Words. In this example, we will print the digits of a number in words. For example, if a number 841 is entered through the keyboard then the program must print “Eight Four One". For solving this first we have to reverse the number than by using switch statement we willl print the digits of the number in words. PROGRAM TO PRINT THE DIGITS OF A NUMBER IN WORDS #include <stdio.h> #include <conio.h> void main () { int n , num = 0 ; printf ( "Enter the Number : " ); scanf ( " %d " ,& n ); while ( n != 0 ) { num =( num * 10 )+( n % 10 ); n /= 10 ; } printf ( "Printing the...
Comments