Quote Originally Posted by atlas07 View Post
ok, i have reformatted my code and sorted out my issue. For all those who were unhappy.
I now have a new problem, how would i output the commission value in case 4? (line 107).
here i have tried using
Code:
cout << "\n5% commission of total sales is " << commission = 0.05 * total_sales << "\n\n\n";
to assign commission a value, but i get the error

illegal use of floating point.

Any ideas?
I led you slightly astray there -- you need parentheses around the expression to keep the order of operations in the right place:
Code:
cout << "\n5% commission of total sales is " << (commission = 0.05 * total_sales) << "\n\n\n";