This way, when you convert a single digit out of your zip code, you can just look it up from the barCodes array.
As for the overall algorithmic structure, assuming you have this lookup table barCodes, your flow should go something like this:
1. Get zip code from user.
2. For each digit, print barCodes[digit]
3. Find the CheckDigit
4. Print barCodes[CheckDigit]