#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main()
{
const double commission = 0.1;
double salesAmount = 0.0;
double totalCommission = 0.0;
double sale1 = 0.0;
double sale2 = 0.0;
double sale3 = 0.0;
double sale4 = 0.0;
double commission1 = 0.0;
double commission2 = 0.0;
double commission3 = 0.0;
double commission4 = 0.0;
// These three lines are function prototypes, and should not be inside the "main" function
// Also there is no body (implementation) of these functions, so any attempt to call them will
// result in an unresolved external
void calcCommission(double, double, double, double);
void displayCommission();
void getTotalCommission();
cout << "Enter first saleman's total sales: ";
cin >> sale1;
cout << "Enter second saleman's total sales: ";
cin >> sale2;
cout << "Enter third saleman's total sales: ";
cin >> sale3;
cout << "Enter fourth saleman's total sales: ";
cin >> sale4;
salesAmount = sale1 + sale2 + sale3 + sale4;
cout << "Total sales: " << salesAmount << endl;
// Here you appear to be calling calcCommission, but there is no body for this function, so it will cause an
// unresolved external.
// Additionally, you are passing 4 variables into the function, but all of them are 0.0, so any calculations
// do on them will not give a valid answer.
// One other point here, your prototype for calcCommission says it returns a void - but this
// code is attempting to assign the return value to "totalCommission"
totalCommission = calcCommission (commission1, commission2, commission3, commission4);
cout << "Commission: " << totalCommission << endl;
system("pause");
return 0;
}