I need to use modulus to individualize the numbers to create a barcode based on each number. I'm want to write out int barcode; int digit1; int digit2; int digit3; int digit4; int digit5; string 1; string 2; string 3; string 4; string 5; string 6; string 7; string 8; string 9; string 0; where those strings are the pre-assigned barcode segments, and based on which number is input, a set of long and short bars are displayed. i've been trying to do digit5 = 10 % zipcode; digit4 = 100 % zipcode; digit3 = 1000 % zipcode; ... etc but how can i easily implement a way to tie the barcode string to the result of the modulus without a billion copy&pastes of if/else? can i have a variable that cycles through the digits? like digit1++ which results in digit2? -- does this make sense?