When the user chooses option 3 the program should exit. See the programming hints below. To complete this lab we need to know exactly how the post office translates zip codes to bar codes and vice-versa. An example of a postal bar code is shown in figure 1. The bar code is made up of long bars and short bars.
Every bar code begins and ends with a single long bar, called framing bars.
Each digit in the zip code is represented by a combination of 5 short and long bars in different patterns. Table 1 shows the short and long bar patterns that represent each digit. The machines that read bar codes are imperfect and often misread a bar code. To compensate for these errors, each bar code also contains a check-sum. The check-sum is the smallest integer such that when it is added to the sum of the digits in the zip code gives a number that is evenly divisible by 10.