1 Attachment(s)
My code is not working correctly
Re: My code is not working correctly
If you want help, you'll have to create an SSCCE that demonstrates the problem. That includes the input that generates the problematic output.
Re: My code is not working correctly
I went ahead and cleaned up the problem. The scanner is grabbing the AnnualSales and then I am trying to calculate that by .20 with AnnualSales * commissionRate. It doesn't do it, I am not sure why.
Re: My code is not working correctly
Quote:
Originally Posted by
shavek911
... I am not sure why.
You have a comment
Quote:
//this is where it wont do the math and returns 0
beside a line, which multiplies 2 doubles, and is returning zero. One of them must be zero. Have you tested to see which is zero, and what could cause that?