Question: Write a C program that lets a user enter a 5 - digit zip code. Your program must make sure that a user enters exactly

Write a C program that
lets a user enter a 5-digit zip code. Your program must make sure that a user enters exactly 5 digits. Otherwise, your
program displays number of digits that a user just entered and asks until a user enters a 5-digit number.
converts a 5-digit number to text.
Note: your program cannot use strings or any functions from the string library.
Sample code execution #1: bold text indicates information entered by a user.
Enter a 5-digit area code: 13578642
you entered 8 digits.
Enter a 5-digit area code: 75
you entered 2 digits.
Enter a 5-digit area code: 678231
you entered 6 digits.
Enter a 5-digit area code: 342
you entered 3 digits.
Enter a 5-digit area code: 1
you entered 1 digits.
Enter a 5-digit area code: 85721
eight five seven two one
Sample code execution #2: bold text indicates information entered by a user.
Enter a 5-digit area code: 7690
you entered 4 digits.
Enter a 5-digit area code: 90346
nine zero three four six
558592.4556996.qx3zqy7
LAB
14.10.1: Homework 3 P3: 5-Digit number to text
ACTIVITY
1 #include 7
Write a C program that lets a user enter a 5 -

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!