I can't find the problem and I've been trying for while.
Any help is appreciated.
here's my program so far
#include<iostream>
#include<iomanip>
using namespace std;
//Function Prototypes
double gPaint(double &);
double hLabor(double);
double cPaint(double, double);
double laborC(double);
double total(double, double);
int main() {
int numRooms;//Number of Rooms
double paintRate,//Cost of paint per gallon
sFRoom,//Square feet of room
paintGall,//Gallons of paint needed
laborHours,//Hours of labor needed
paintCost,//The cost of paint for the job
laborCost;//The cost of Labor for the job
system("clear");
cout << "\n\n\t\tWhat are the number of rooms that will be painted?: ";
cin >> numRooms;
cout << "\t\tWhat is the price of the paint per gallon?: ";
cin >> paintRate;
cout << "\t\tWhat is the square feet of wall space in each room?: ";
cin >> sFRoom;
paintGall = gPaint(sFRoom);
laborHours = hLabor(sFRoom);
paintCost = cPaint(paintGall, paintRate);
laborCost = laborC(laborHours);
cout << "\n\n\t\tWhat you will need\n"
<< "\t\t-------------------------------------------------\n";
cout << "\t\tGallons of Paint: " << paintGall << endl;
cout << "\t\tHours of labor: " << laborHours << endl;
cout << "\t\tCost of Paint: " << paintCost << endl;
cout << "\t\tLabor Charges: " << laborCost << endl;
cout << "\t\tTotal Charges: " << total(paintCost, laborCost) << endl;
return 0;
}
double gPaint(double & SqFt) {
SqFt / 115.0;
}
double hLabor(double SqFt) {
(SqFt / 115.0) * 8.0;
}
double cPaint(double gallons, double rate) {
gallons * rate;
}
double laborC(double hours) {
hours * 18;
}
double total(double paint, double labor) {
paint * labor;
}

New Topic/Question
Reply




MultiQuote



|