Maybe you should've of asked some questions in your class.
On a different note. The forum frowns on students posting homework questions and asking for solutions. Please post what you've accomplished so far and ask specific questions about specific problems.
gerard4143
Nearly a Posting Maven
2,272 posts since Jan 2008
Reputation Points: 512
Solved Threads: 387
Your general program outline will probably look something similar to this:
#include<iostream>
using namespace std;
//Function prototypes
int prompt();
double calculate_commission(double& commission);
//main driver
int main()
{
//local function variable declaration(s)
double commission = 0.0;
//main loop
while(prompt())
{
calculate_commission(commission);
}
return 0;
}
//Function Definitions
int prompt()
{
/* you write this */
}
double calculate_commission(double& commission)
{
/* i helped you enough,
now it's time to help ye'self
*/
}
Clinton Portis
Practically a Posting Shark
833 posts since Oct 2005
Reputation Points: 237
Solved Threads: 118