Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Anyone know how to sort this out ??

Answers

  • you only ever declare price in the if statements so they are not accessible to the whole function. Write int price = 0; outside of the if statements and in the if statements set price = x;

Sign In or Register to comment.