In your updated code, can you explain the logic behind your for loop beginning at line 53? What are you expecting the user to input for the produceCode?
a) Is the user supposed to type in the index value of the element in produceCode? For example, the user enters 1 and the program calculates 5.50 * weight?
b) Is the user supposed to type in the value of 5.50 for the produceCode and your program will determine the index is 1?