Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

So, i am trying to get this code to work but for all four of my functions it say

ID: 2247535 • Letter: S

Question

So, i am trying to get this code to work but for all four of my functions it says that the function does not take 1,2,3, or 4 arguements depending on how many i have put can someone help me get this code right please

// Attached: HW_1a, 1b, 1c

//=======================================

// Project: HW_1a.cpp

//=======================================

// Programmer: David

// Class: CIS 17A

//================================================

#include "stdafx.h"

#include <iostream>

using namespace std;

float getSalesAmt(float a); // function proto

float calcCommision(float a, float b, double c, double d); // function proto

float calcPay(float b, int e, float f); // function proto

float displayPay(float a, float b, int e, float f); // function proto

int main()

{

float monthlySales = 0; // A

float commision = 0; // B

double //C // this is the percentage for the commision when sales are between 25000 and 50000

double two = 0.02; //D // this is the percentage for commision when sales are over 50000

int basePay = 2500; // E

float totalPay = 0; //F

getSalesAmt(monthlySales);

calcCommision(monthlySales, commision, onehalf, two);

calcPay(commision, basePay, totalPay);

displayPay(monthlySales, commision, basePay, totalPay);

return 0;

}

float getSalesAmt(float a)

{

cout << "Enter the monthly sales amount: ";

cin >> a;

return 0;

}

float calcCommision(float a, float b, double c, double d)

{

if(a > 50000)

{

b = a * c;

}

if (a > 25000 && a < 50000)

{

b = a * d;

}

if (a < 25000)

{

b = 0;

}

return b;

}

float calcPay(float b, int e, float f)

{

f = b + e;

}

float displayPay(float a, float b, int e, float f)

{

cout << "Monthly Sales: $" << a << " ";

cout << "Commission: $" << b << " ";

cout << "Base Pay: $" << e << " ";

cout << "Total Pay: $" << f << " ";

}

Explanation / Answer

#include "stdafx.h"
#include <iostream>

using namespace std;

float getSalesAmt(float a); // function proto
float calcCommision(float a, float b, double c, double d); // function proto
float calcPay(float b, int e, float f); // function proto
float displayPay(float a, float b, int e, float f); // function proto

int main()
{
float monthlySales = 0; // A
float commision = 0; // B
double //C // this is the percentage for the commision when sales are between 25000 and 50000
double two = 0.02; //D // this is the percentage for commision when sales are over 50000
int basePay = 2500; // E
float totalPay = 0; //F

getSalesAmt(monthlySales);
calcCommision(monthlySales, commision, onehalf, two);
calcPay(commision, basePay, totalPay);
displayPay(monthlySales, commision, basePay, totalPay);

return 0;
}

float getSalesAmt(float a)
{
cout << "Enter the monthly sales amount: ";
cin >> a;
return 0;

}

float calcCommision(float a, float b, double c, double d)
{
a=getSalesAmt(monthlySales);
c=onehalf;
if(a > 50000)
{
b = a * c;
}

if (a > 25000 && a < 50000)
{
b = a * d;
}
if (a < 25000)
{
b = 0;
}
return b;
}

float calcPay(float b, int e, float f)
{
f = b + e;
}

float displayPay(float a, float b, int e, float f)
{

cout << "Monthly Sales: $" << a << " ";
cout << "Commission: $" << b << " ";
cout << "Base Pay: $" << e << " ";
cout << "Total Pay: $" << f << " ";

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote