Cant find my error

I messed up somewhere here. The program compiles but it always evaluates to 0. Im doing this for school. Its supposed to calculate apples and oranges from a grocery store at a price with one discount. The discount is how ever many oranges they buy, they get that percent off there total. Hopefully that helps understand the program but i dont know why its evaluating to 0 when i run the program. Any help? And take it easy on meh lol

EDIT: Im sorry for this uneccesary post. I found it.
Last edited on
OK, all those compound assigns and assigns on combined lines *may* end in syntax errors, although I honestly don't know. Nevertheless those lines are confusing the heck out of me.
That math confounds me so I'd have some math like this: add up apples*appleprice and oranges*orangeprice. Divide oranges by 100 to get the percentage off. Multiply that total price by the resulting percentage to get the amount off and subtract it off the total price. What's your math supposed to be?
you can't do multiple assingment like this.

useroranges /= percentvalue = totaloff;

it's the same as saying, useroranges = useroragnes / percentvalue = totaloff;

results are "undefined" meaning they never do what you want them to.
Last edited on
Good. I had a feeling that was messed up.
Topic archived. No new replies allowed.