I have to write this program, and I am not sure exactly how to write the functions and where to put what. I have tried several times, and decided to start over from the beginnning. What i have so far is at the very bottom.

Here is the prompt:

Overview

For this assignment, write a program that will calculate weekly pay for an employee of XYZ Distributors. The program will run as long as the user enters ‘y’ or ‘Y’ when they are asked if they want to calculate weekly pay.

The program should first ask the user if he/she wants to calculate their pay amount for a week. If the user enters a ‘y’ or ‘Y’, it should then ask the user for three values:

The number of hours worked - (minimum: 0, maximum: 60)
The hourly wage - (minimum: $0.00, maximum: $30.00)
The number of exemptions - (minimum: 0, maximum: 5)

The three values will then be used to calculate:
Gross pay
Net pay
Social Security
Federal income tax
State income tax
The formula for Net pay is:

Net pay = Gross pay - (Social security + Federal income tax + State income tax)

Once the user does not want to calculate weekly pay, display the total gross pay, total net pay, and a bargraph of asterisks that is equal to the number of weeks that weekly pay has been calculated. The total values should only be displayed if the user calculated one or more weeks worth of pay.

Functions that you must write:

1) double CalculateGrossPay( double wage, int hoursWorked )
The purpose of this function is to calculate and return an employee’s gross pay for one week. It takes two arguments: a double representing the employee’s hourly wage and an integer representing the number of hours that the employee worked for one week.

The maximum number of hours that an employee can work before they start to earn overtime pay is 40 hours. If the number of hours worked is less than or equal to 40, gross pay is equal to the hourly wage times the number of hours worked. If the number of hours worked is greater than 40, the gross pay is equal to 40 times the hourly wage plus 1.5 times the hourly wage for every hour over 40.

2) double CalculateFederalTax( double grossPay, int numExemptions )
The purpose of this function is to calculate and return the federal income tax to withhold from an employee. It takes two arguments: a double that represents the employee’s gross pay and an integer argument that represents the number of exemptions claimed by the employee.

The federal withholding allowance for a weekly pay period is $55.77. The amount of the employee’s gross pay that is subject to federal taxation is equal to gross pay minus (the federal withholding allowance times the number of exemptions). The amount subject to taxation is then used to calculate the federal income tax to withhold. The amount to withhold can be calculated using the following table:

Amount subject to taxation(X)-----Amount to withhold
X < $51------------------------------$0
$51 < X < $552--------------------15% of X
$552 < X < $1196------------------$75.15 plus 28% of X greater than $552
$1196 < X < $2662-----------------$255.47 plus 31% of X greater than $1196
$2662 < X < $5750-----------------$709.93 plus 36% of X greater than $2662
$5750 < X---------------------------$1821.61 plus 39.6% of X greater than $5750

If an employee’s gross pay is $1600.00 and they have 2 exemptions, the amount of federal income tax withheld is $346.13.

Amount subject to taxation = 1600.00 - (55.77 * 2) = 1488.46

31% of amt sub. to taxation > $1196 = 0.31 * (1488.46 - 1196) = 90.66

Amount to withhold = 255.47 + 90.66 = 346.13

3) double CalculateStateTax( double grossPay, int numExemptions )
The purpose of this function is to calculate and return the state income tax to withhold from an employee. It takes two arguments: a double that represents the employee’s gross pay and an integer that represents the number of exemptions claimed by the employee.

The state exemption amount for a weekly pay period is $38.46. If the employee’s gross pay is less than or equal to the state exemption amount times the number of exemptions, the amount of the state income tax to withhold is $0.00. If the employee’s gross pay is greater than the state exemption amount times the number of exemptions, the amount of state income tax to withhold is equal to 3% of (gross pay minus (the state exemption amount times the number of exemptions)).

4) double CalculateSocialSecurity( double grossPay )
The purpose of this function is to calculate and return the amount of social security to withhold from an employee. It takes one argument: a double that represents the employee’s gross pay.

The amount of social security to withhold from the employee is equal to 7.65% of the employee’s gross pay.

5) int ValidInt( string prompt, int lowerBound, int upperBound )
The purpose of this function is to get an integer from the user that is within a certain range. It takes three arguments: a string that is used as a prompt to the user to tell them what number they are entering, an integer that represents the smallest integer that the user can enter, and an integer that represents the largest integer that the user can enter.

The second and third arguments will be used to ensure that the user enters a valid value. If an invalid value is entered, display an error message and prompt the user to re-enter a value. This should be done repeatedly until the user enters a valid integer. The function returns the valid integer.

A calling statement like: num = ValidInt( "Enter a 2 digit number", 10, 99 );

Should produce the following prompt: Enter a 2 digit number (10...99):

6) double ValidDouble( string prompt, double lowerBound, double upperBound )
This function is exactly like ValidInt, except that it takes two doubles, rather than integers.

7) void BarGraph( int numWeeks )
The purpose of this function is to display a line of asterisks equal to the number of weeks that weekly pay has been calculated. It takes one argument: an integer that represents the number of weekly pay calculations that have been performed. This function returns nothing.

Programming Requirements:

Define symbolic constants for the federal withholding allowance ($55.77), the state exemption amount ($38.46), and the social security percentage (7.65%). You may use more symbolic constants if you desire, but you must have at least the three listed above.

Use the ValidInt function to get the number of hours worked and the number of exemptions from the user.

Use the ValidDouble function to get the hourly wage amount from the user.

The program should run as long the user enters ‘y’ or ‘Y’. Use one of the "to" functions to avoid having to code a compound condition.

Display the week number before displaying the gross pay, taxes, social security, and net pay. (see sample output)

Your program must be fully documented. There must be a documentation box for every function in the program. Line documentation should be used wherever needed, but need not be on every line of code. White space and indentation should be used to make your code easily readable.

Sample Output:

Would you like to calculate your weekly pay? Y

Enter the number of hours worked (0...60): 60
Enter the hourly wage (0.00...30.00): 30.00
Enter the number of exemptions (0...5): 2

Week 1:
You worked 60 hours at $30.00 per hour.
Gross Pay: 2100.00
Federal Tax: 501.13
State Tax: 60.69
Social Security: 160.65
Net Pay: 1377.52


Would you like to calculate your weekly pay? n

Total Gross Pay: 2100.00
Total Net Pay: 1377.52

Total Number of Weeks: *


Here is what I have done so far. Not sure if it is really correct to start with....

#include <iostream>
#include <iomanip>

#include <math.h> 

using namespace std;

#define FEDERAL_WITHHOLDING 55.77
#define STATE_EXEMPTION 38.46
#define SOCIAL_SECURITY .0765

// Setting up all prototypes for the functions
double CalculateGrossPay( double, int );
double CalculateFederalTax( double, int );
double CalculateStateTax( double, int );
double CalculateSocialSecurity( double );
int ValidInt( string, int , int );
double ValidDouble( string, double, double );
void BarGraph( int );


int main()
{



	cout << endl;
	system ("pause");
	return 0;
}

// Setting up all functions

/*****************************************************************************
double CalculateGrossPay( )
The purpose of this function is to calculate and return an employee’s gross 
pay for one week. It takes two arguments: a double representing the employee’s 
hourly wage and an integer representing the number of hours that the employee 
worked for one week.
*****************************************************************************/

double CalculateGrossPay( double wage, int hoursWorked )
{
	int hours;
	double wage;
	double grossPay;

	cout << "Enter the amount of hours worked this week (0...60): ";
	cin >> hours;

	cout << "Enter the hourly wage (0.00...30.00): ";
	cin >> wage;

	if ( hours > 40)
	{
		grossPay = (40 * wage) + ((hours - 40) * wage * 1.5)
	}
	else
	{
		grossPay = hours * wage
	}
	return grossPay;
}


/*****************************************************************************
double CalculateFederalTax( )
The purpose of this function is to calculate and return the federal income tax 
to withhold from an employee. It takes two arguments: a double that represents 
the employee’s gross pay and an integer argument that represents the number of 
exemptions claimed by the employee.
*****************************************************************************/

double CalculateFederalTax( double grossPay, int numExemptions )
{
	int exemptions;
	double taxationAmount;

	cout << "Enter the number of exemptions: ";
	cin >> exemptions;

	taxationAmount = grossPay - (FEDERAL_WITHHOLDING * exemptions)

	switch ( X )
		case taxationAmount < 51:

		case taxationAmount >= 51 || taxationAmount < 552:

		case taxationAmount >= 552 || taxationAmount < 1196:

		case taxationAmount >= 1196 || taxationAmount < 2662:

		case taxationAmount >= 2662 || taxationAmount < 5750:

		case taxationAmount >= 5750:

}


/*****************************************************************************
double CalculateStateTax( )
The purpose of this function is to calculate and return the state income tax 
to withhold from an employee. It takes two arguments: a double that represents 
the employee’s gross pay and an integer that represents the number of exemptions
claimed by the employee.
*****************************************************************************/

double CalculateStateTax( double grossPay, int numExemptions )
{

}


/*****************************************************************************
double CalculateSocialSecurity( )
The purpose of this function is to calculate and return the amount of social 
security to withhold from an employee. It takes one argument: a double that 
represents the employee’s gross pay.
*****************************************************************************/

double CalculateSocialSecurity( double grossPay )
{

}


/*****************************************************************************
int ValidInt( )
The purpose of this function is to get an integer from the user that is within
a certain range. It takes three arguments: a string that is used as a prompt 
to the user to tell them what number they are entering, an integer that 
represents the smallest integer that the user can enter, and an integer 
that represents the largest integer that the user can enter. The second and 
third arguments will be used to ensure that the user enters a valid value. If 
an invalid value is entered, display an error message and prompt the user to
re-enter a value. This should be done repeatedly until the user enters a valid 
integer. The function returns the valid integer.
*****************************************************************************/

int ValidInt( string prompt, int lowerBound, int upperBound )
{

}


/*****************************************************************************
double ValidDouble( )
This function is exactly like ValidInt, except that it takes two doubles, 
rather than integers.
*****************************************************************************/

double ValidDouble( string prompt, double lowerBound, double upperBound )
{

}


/*****************************************************************************
void BarGraph( )
The purpose of this function is to display a line of asterisks equal to the 
number of weeks that weekly pay has been calculated. It takes one argument: an 
integer that represents the number of weekly pay calculations that have been 
performed. This function returns nothing.
*****************************************************************************/

void BarGraph( int numWeeks )
{

}

Edited 5 Years Ago by WolfPack: CODE Tags

I had a similar assignment although I was not required to write any function....maybe it will help.

#include <iostream>
using namespace std;

int main()

{
	// declare vaiables

	int nDependents;
	double payRate = 16.78, hoursWorked, otPay, regPay, grossPay, totDeduc;
	double ssn = 0.06, fica = 0.14, state = 0.05, uDues = 10.00, healthIn = 0.00;

	cout << "Enter number of hours worked: ";
	cin >> hoursWorked;
	cout << "Enter number of dependents: ";
	cin >> nDependents;

	// check hours worked
	if (hoursWorked > 40)
	{
		otPay = ((hoursWorked - 40) * (payRate * 1.5));
		regPay = 40 * payRate;
		grossPay = regPay + otPay;
	}
	else
	{
		grossPay = hoursWorked * payRate;
	}
	// check for dependents
	if (nDependents >= 3)
	{
		healthIn = 35.00;
	}

	totDeduc = ((ssn * grossPay) + (fica * grossPay) + (state * grossPay) + uDues + healthIn);

	cout.setf (ios::fixed);
	cout.setf (ios::showpoint);
	cout.precision (2);

	
	cout << "Your Gross Pay is: $" << grossPay << endl;
	cout << "Deductions" << endl;
	cout << "Social Security: $" << ssn * grossPay << endl;
	cout << "Federal Income Tax: $" << fica * grossPay << endl;
	cout << "State Income Tax: $" << state * grossPay << endl;
	cout << "Union dues: $" << uDues << endl;
	cout << "Health Insurance: $" << healthIn << endl;
	cout << "Total Deductions; $" << totDeduc << endl;
	cout << "Net Take-Home Pay: $" << grossPay - totDeduc << endl;

	return 0;

}

Jmcginny5, your code is unreadable, please put them in code tags.

#include <iostream>
#include <iomanip>

#include <math.h> 

using namespace std;

#define FEDERAL_WITHHOLDING 55.77
#define STATE_EXEMPTION 38.46
#define SOCIAL_SECURITY .0765

// Setting up all prototypes for the functions
double CalculateGrossPay( double, int );
double CalculateFederalTax( double, int );
double CalculateStateTax( double, int );
double CalculateSocialSecurity( double );
int ValidInt( string, int , int );
double ValidDouble( string, double, double );
void BarGraph( int );


int main()
{



cout << endl;
system ("pause");
return 0;
}

// Setting up all functions

/*****************************************************************************
double CalculateGrossPay( )
The purpose of this function is to calculate and return an employee’s gross 
pay for one week. It takes two arguments: a double representing the employee’s 
hourly wage and an integer representing the number of hours that the employee 
worked for one week.
*****************************************************************************/

double CalculateGrossPay( double wage, int hoursWorked )
{
int hours;
double wage;
double grossPay;

cout << "Enter the amount of hours worked this week (0...60): ";
cin >> hours;

cout << "Enter the hourly wage (0.00...30.00): ";
cin >> wage;

if ( hours > 40)
{
grossPay = (40 * wage) + ((hours - 40) * wage * 1.5)
}
else
{
grossPay = hours * wage
}
return grossPay;
}


/*****************************************************************************
double CalculateFederalTax( )
The purpose of this function is to calculate and return the federal income tax 
to withhold from an employee. It takes two arguments: a double that represents 
the employee’s gross pay and an integer argument that represents the number of 
exemptions claimed by the employee.
*****************************************************************************/

double CalculateFederalTax( double grossPay, int numExemptions )
{
int exemptions;
double taxationAmount;

cout << "Enter the number of exemptions: ";
cin >> exemptions;

taxationAmount = grossPay - (FEDERAL_WITHHOLDING * exemptions)

switch ( X )
case taxationAmount < 51:

case taxationAmount >= 51 || taxationAmount < 552:

case taxationAmount >= 552 || taxationAmount < 1196:

case taxationAmount >= 1196 || taxationAmount < 2662:

case taxationAmount >= 2662 || taxationAmount < 5750:

case taxationAmount >= 5750:

}


/*****************************************************************************
double CalculateStateTax( )
The purpose of this function is to calculate and return the state income tax 
to withhold from an employee. It takes two arguments: a double that represents 
the employee’s gross pay and an integer that represents the number of exemptions
claimed by the employee.
*****************************************************************************/

double CalculateStateTax( double grossPay, int numExemptions )
{

}


/*****************************************************************************
double CalculateSocialSecurity( )
The purpose of this function is to calculate and return the amount of social 
security to withhold from an employee. It takes one argument: a double that 
represents the employee’s gross pay.
*****************************************************************************/

double CalculateSocialSecurity( double grossPay )
{

}


/*****************************************************************************
int ValidInt( )
The purpose of this function is to get an integer from the user that is within
a certain range. It takes three arguments: a string that is used as a prompt 
to the user to tell them what number they are entering, an integer that 
represents the smallest integer that the user can enter, and an integer 
that represents the largest integer that the user can enter. The second and 
third arguments will be used to ensure that the user enters a valid value. If 
an invalid value is entered, display an error message and prompt the user to
re-enter a value. This should be done repeatedly until the user enters a valid 
integer. The function returns the valid integer.
*****************************************************************************/

int ValidInt( string prompt, int lowerBound, int upperBound )
{

}


/*****************************************************************************
double ValidDouble( )
This function is exactly like ValidInt, except that it takes two doubles, 
rather than integers.
*****************************************************************************/

double ValidDouble( string prompt, double lowerBound, double upperBound )
{

}


/*****************************************************************************
void BarGraph( )
The purpose of this function is to display a line of asterisks equal to the 
number of weeks that weekly pay has been calculated. It takes one argument: an 
integer that represents the number of weekly pay calculations that have been 
performed. This function returns nothing.
*****************************************************************************/

void BarGraph( int numWeeks )
{

}

First things first, get it to compile. Stick some return values in there, even if they're nonsense return values. Second, indent the code so it's readable. Third, find your missing brackets. That'll be much easier when you indent.

I just have no clue how to even write the functions so that it will be able to compile.

I finally have the program done. But there is one portion that I can't get to work. When displaying results, I need to show what week it is and it needs to increment if the user wants to continue to calculate their pay. However, when I try, it starts with 1 and increments, but it is also showing the number before and after "week". And I have been playing around trying to set it to work, and I can't figure it out. Please help me figure out what i'm not doing right. (it is the portion that is with the function called int WeekDisplay. and it is the variable numWeekDisplay)

#include <iostream>
#include <iomanip>

#include <math.h> 

using namespace std;

#define FEDERAL_WITHHOLDING 55.77
#define STATE_EXEMPTION     38.46
#define SOCIAL_SECURITY     .0765

// Setting up all prototypes for the functions
double CalculateGrossPay( double, int );
double CalculateFederalTax( double, int );
double CalculateStateTax( double, int );
double CalculateSocialSecurity( double );
int ValidInt( string, int , int );
double ValidDouble( string, double, double );
void BarGraph( int );
int WeekDisplay ( int );

int main()
{
// Declaring all variables
char yesOrNo;
int hoursWorked,numExemptions,numWeeks=0, numWeekDisplay=1;
double wage,grossPay,federalTax,stateTax,sstate,netPay,totalGross=0,totalNet=0;

//Setting the precision
cout<<setprecision(2)<<fixed<<showpoint;

// Asking the user whether they want to calculate their weekly pay
cout << "Do you want to calculate your weekly pay? (Y/N) ";
cin >> yesOrNo;

// Setting up a while statement for when the user enters 'y' or 'Y'
while( yesOrNo == 'y' || yesOrNo == 'Y' )
   {
   // Setting up calling statements 
   hoursWorked = ValidInt("\nEnter the number of hours worked - (minimum: 0, maximum: 60) ",0,60);
   wage = ValidDouble("Enter the hourly wage - (minimum: $0.00, maximum: $30.00) ",0.,30.);
   numExemptions = ValidInt("Enter the number of exemptions - (minimum: 0, maximum: 5) ",0,5);
   
   // Setting variables equal to the functions to be executed
   grossPay = CalculateGrossPay( wage, hoursWorked );
   federalTax = CalculateFederalTax( grossPay, numExemptions );
   stateTax = CalculateStateTax( grossPay, numExemptions );
   sstate = CalculateSocialSecurity( grossPay );
   netPay = grossPay - ( sstate + federalTax + stateTax );
   numWeekDisplay = WeekDisplay ( numWeekDisplay);
   
   
   // Displaying the results 
   cout << "\nWeek " << numWeekDisplay << ":" << endl;
   cout << "You worked " << hoursWorked << " hours at $" << wage << " per hour.\n";
   cout << "Gross Pay:           " << grossPay << endl;
   cout << "Federal Tax:         " << federalTax << endl;
   cout << "State Tax:           " << stateTax << endl;
   cout << "Social Security:     " << sstate << endl;
   cout << "Net Pay:             " << netPay << endl;
    
   totalGross+=grossPay;         // total gross pay = gross pay + total gross pay
   totalNet+=netPay;             // total net pay = net pay + total net pay
   numWeeks++;                   // increase # of weeks every time user wants to calculate weekly pay
   numWeekDisplay++;
   
   // Ask the user whether they want to calculate weekly pay again
   cout << "\nDo you want to calculate your weekly pay? (Y/N) ";
   cin >> yesOrNo;
   }

// If the user enters no, display this at the end
cout << "\nTotal Gross Pay:     " << totalGross << endl;
cout << "Total Net Pay:       " << totalNet << endl;
BarGraph( numWeeks );


cout << endl;
system ("pause");
return 0;
}

// Setting up all functions

/*****************************************************************************
double CalculateGrossPay( )
The purpose of this function is to calculate and return an employee’s gross 
pay for one week. It takes two arguments: a double representing the employee’s 
hourly wage and an integer representing the number of hours that the employee 
worked for one week.
*****************************************************************************/

double CalculateGrossPay( double wage, int hoursWorked )
{
//Declaring variables
double grossPay;

// Setting up if-else statement
if( hoursWorked > 40)
  {
  // formula to be used if hours worked is over 40
  grossPay = ( wage * 40) + ( wage * 1.5 * (hoursWorked - 40) );
  }
else
  {
  // formulat to be used if hours worked is less than or equal to 40
  grossPay=(wage* hoursWorked);
  }
  
return grossPay;
}


/*****************************************************************************
double CalculateFederalTax( )
The purpose of this function is to calculate and return the federal income tax 
to withhold from an employee. It takes two arguments: a double that represents 
the employee’s gross pay and an integer argument that represents the number of 
exemptions claimed by the employee.
*****************************************************************************/

double CalculateFederalTax( double grossPay, int numExemptions )
{
// Declaring variables
double federal;

// Formula to be used to determine how much federal tax is taken out of pay
grossPay = grossPay - (FEDERAL_WITHHOLDING * numExemptions );

// Setting up if-else-if statement to be used
if( grossPay < 51 )
  {
  federal = 0;
  }
else if( grossPay < 552 )
  {
  federal = 0.15 * grossPay;
  }
else if( grossPay < 1196 )
  {
  federal = 75.15+( grossPay - 552 ) * 0.28;
  }
else if( grossPay < 2662 )
  {
  federal = 255.47 + ( grossPay -1196 ) * 0.31;
  }
else if(grossPay <5750)
  {
  federal = 709.93 + ( grossPay - 2662 ) * 0.36;
  }
else
  {
  federal = 1821 + ( grossPay - 5750 ) * 0.396;
  }

return federal;

}


/*****************************************************************************
double CalculateStateTax( )
The purpose of this function is to calculate and return the state income tax 
to withhold from an employee. It takes two arguments: a double that represents 
the employee’s gross pay and an integer that represents the number of exemptions
claimed by the employee.
*****************************************************************************/

double CalculateStateTax( double grossPay, int numExemptions )
{
// Declaring variables
double state;

// Setting up if else statements
// if gross pay is less than or equal to state exemption * number of exemptions
if( grossPay <= STATE_EXEMPTION * numExemptions)  
  {
  // state tax is 0
  state = 0;
  }
else
  {
  // state tax is calculated by the following formula
  state = 0.03 * ( grossPay - (STATE_EXEMPTION * numExemptions));
  }
     
return state;
}


/*****************************************************************************
double CalculateSocialSecurity( )
The purpose of this function is to calculate and return the amount of social 
security to withhold from an employee. It takes one argument: a double that 
represents the employee’s gross pay.
*****************************************************************************/

double CalculateSocialSecurity( double grossPay )
{
// Declaring variables
double SS;

// Formula used to calculate social security tax
SS = SOCIAL_SECURITY * grossPay;

return SS;
}


/*****************************************************************************
int ValidInt( )
The purpose of this function is to get an integer from the user that is within
a certain range. It takes three arguments: a string that is used as a prompt 
to the user to tell them what number they are entering, an integer that 
represents the smallest integer that the user can enter, and an integer 
that represents the largest integer that the user can enter.  The second and 
third arguments will be used to ensure that the user enters a valid value. If 
an invalid value is entered, display an error message and prompt the user to
re-enter a value. This should be done repeatedly until the user enters a valid 
integer. The function returns the valid integer.
*****************************************************************************/

int ValidInt( string prompt, int lowerBound, int upperBound )
{
// Declaring variables
double num;

cout << prompt << ": ";
cin >> num;

// while loop to be used if data entered is above or below the boundaries
while( num < lowerBound || num > upperBound)
  {
  // Display this "invalid statement" if data is out of the boundaries
  cout << "Error: Entry out of range. Try again.\n";
  cout << prompt << ": ";
  cin >> num;                // store the value entered into num
  }
  
return num;
}


/*****************************************************************************
double ValidDouble( )
This function is exactly like ValidInt, except that it takes two doubles, 
rather than integers.
*****************************************************************************/

double ValidDouble( string prompt, double lowerBound, double upperBound )
{
// Declaring variables
int num;

cout << prompt << ": ";
cin >> num;

// while loop to be used if data entered is above or below the boundaries
while ( num < lowerBound || num > upperBound )
  { 
  // Display this "invalid statement" if data is out of the boundaries
  cout << "Error: Entry out of range. Try again. \n";
  cout << prompt << ": ";
  cin >> num;                // store the value entered into num
  }
return num;
}


/*****************************************************************************
void BarGraph( )
The purpose of this function is to display a line of asterisks equal to the 
number of weeks that weekly pay has been calculated. It takes one argument: an 
integer that represents the number of weekly pay calculations that have been 
performed. This function returns nothing.
*****************************************************************************/

void BarGraph( int numWeeks )
{
// Display this cout statement
cout << "\nTotal Number of Weeks: ";

// Used to create the bar graph for the number of weeks of pay that were calculated
for ( int i=0; i < numWeeks; i++ )
  {
  cout << "* ";
  }   
}


/*****************************************************************************
int WeekDisplay ()
The purpose of this function is to display the number of the weekly salary
that is being calculated and to have it increment by one each time the user 
says yes.
*****************************************************************************/

int WeekDisplay (int numWeekDisplay)
{
for (int i=1; i < numWeekDisplay; i++ )
  {
  cout << numWeekDisplay;
  }

return numWeekDisplay;
}
This question has already been answered. Start a new discussion instead.