I keep getting the function does not take 0 arguments error. I have read a few other posts and sort of recognize where my problem is but I can't figure out how to fix it!!
Here's the program. I know this program can be written much easier but my instructor wants 3 functions (1 input, 2 calculation, 3 display)
OK that solved the problem, but now there's a new problem. When I run the program, it won't save the number I input for sales. It says the number that I entered was 2 no matter what number I put in and the math for the commission is calculated wrong and it's a different number every time I run the program.
Here is an example of the command prompt window:
Please enter in the sales amount: 100
The sales amount entered is : 2
The commission earned is: -4.47069e+134
Your function getsales returns a value. You are not doing anything with it. You are throwing it away. Here is how to store the returned value from a function:
1 2
double someVariable;
someVariable = getSales(); // now the variable named someVariable has the returned value from the function