Try typing these lines into the beginning of your program and see what happens:
Code:for (int i = 0; i < 10; i++)
cout << i/4 << endl;
for (int i = 0; i < 10; i++)
cout << i/4.0 << endl;
Printable View
Try typing these lines into the beginning of your program and see what happens:
Code:for (int i = 0; i < 10; i++)
cout << i/4 << endl;
for (int i = 0; i < 10; i++)
cout << i/4.0 << endl;
rottenstock, have you noticed that the layout when you post code differs from when others post code? That's because posts in this forum uses some formatting tags. You can read more about them here http://www.codeguru.com/forum/misc.php?do=bbcode
everytime i do it how i think it should be done, the result is 0.
I'm very new at this, but from the research i have done, it seems like i should use a float command, but i am still confused by that.
Basically, it's going to be:
ItemPrice * ProductDiscountRate (which should be a %, like .25) = Subtoal
and then the Senior Discount is suppose to be Subtotal * SeniorDiscountRate
But both of those ways return a value of 0.
Government ********