I am attempting to write a program that asks the user to enter an integer and writes each digit in English.
For example: 234 would be two three four or 12 would be one two
This is what I have so far.
Code:#include <stdio.h> int main (void) { int x; printf ("\tPlease enter an integer:"); scanf ("%d", &x); printf ("\tYou have entered:\n"); switch (x) { case 1: printf ("one"); break; case 2: printf ("two"); break; case 3: printf ("three"); break; case 4: printf ("four"); break; case 5: printf ("five"); break; case 6: printf ("six"); break; case 7: printf ("seven"); break; case 8: printf ("eight"); break; case 9: printf ("nine"); break; } printf ("\n"); }