Can some1 help tell me y my function keeps having errors? I want the user to enter 4 price s, total sales each products sale is worth 25% of the sale. I wanna take these 4 products and calculate an average and return the value to the variable slsAvg. Is my function prototype, call, and function that much off?
Code:double calcAveragefunc(double towers, double monitors, double printers, double desks, double slsAvg) { return slsAvg; } using namespace std; int main(){ double towers; double monitors; double printers; double desks; double totalProductSales; double slsAvg; cout << "Enter towers price: "; cin >> towers; cout << "Enter monitors price: "; cin>> monitors; cout << "Enter printers price: "; cin >> printers; cout << "Enter desks price: "; cin >> desks; totalProductSales = towers + monitors + printers + desks * 25; slsAvg = totalProductSales / 4; return 0; } double calcAveragefunc(double towers, double monitors, double printers, double desks, double slsAvg) { return slsAvg; }