If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Customer ID: 1 has gas usage of 80 and owes $135
Customer ID: 2 has gas usage of 45 and owes $90
Customer ID: 3 has gas usage of 90 and owes $150
Customer ID: 4 has gas usage of 34 and owes $68
Customer ID: 5 has gas usage of 60 and owes $120
Customer ID: 6 has gas usage of 120 and owes $195
Total amount of customers is 6
Total amount for all customers is $758

This is the outcome when I run the code that I have:
1. It prompts to enter the customer id
2. It prompts for the gas usage
3. It prompts for the second customer id
4. It continues to prompt for the customer id until I enter -1
5. Depending on how many time I enter a value that isn't -1, it displays something like this:
Customer ID: 1135
Customer ID: 2135

So it's not prompting for the gas usage after the first gas usage prompt and just keeps displaying the first calculation next to each customer id I enter.