Question: Need help writing this C++ program in Geany. Thank you in advance. Write a C++ program that prompts the user to enter a zip code,

 Need help writing this C++ program in Geany. Thank you in Need help writing this C++ program in Geany. Thank you in advance.

Write a C++ program that prompts the user to enter a zip code, converts that zip code to a bar code representation described below, and displays the resulting bar code. Zip Codes: The user may enter a zip code in one of the following three acceptable zip code formats: 1. Short: A 5-digit zip code, such as 67218. 2. Medium A hyphen and a 4-digit extension are appended to the short zip code to produce the medium version, such as 67218-1234. 3. Long: A plus sign and the last two digits of the street address or box number are appended to the medium zip code to get the long version, such as 67218-1234+12. Checksum Digit: This is a unique digit (between 0 and 9), which when added to the sum of all the other digits in the zip code, will make the sum a multiple of 10. For example, if the zip code is 67218, then 6 + 7 + 2 + 1 + 8 = 24, so the checksum digit must be 6. As another example, if the zip code is 67218-1234+12, then 6 + 7 + 2 + 8 +1 + 2 +3+4+ l +2 = 37, so checksum digit is 3. The usage of the checksum digit to obtain the bar code is explained below. Bar Codes: The format for a bar code is: | Z E D C | where: I is a vertical bar character, Z is the 5-digit encoded short bar code (for all zip codes), E is the optional 4-digit encoded bar code extension (for medium and long zip codes only), D is the optional encoded 2-digit delivery point (for long zip codes only), C is the encoded checksum digit (for all zip codes). Encodings of digits employ two bars: the short one '.' and a tall one '|', as follows

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 Databases Questions!