plz help

ALright so basically your suppose to tell the program the length and width of room and cost per sq foot. And the program should calculate the total including labor and tax cost. The labor and tax cost are both constant. Labor = 0.35 Tax=0.05.






#include <iostream>
#include <iomanip>
using namespace std;
void get_data(int & length,int& width,float costpersqfoot);
float InstalledPrice(int length,int width,float costpersqfoot);
float totalprice(float installion);
void printdata(int length,int width,float price);
const float LABOR_COST=0.35;
const float TAX_RATE=0.05;
int main ()
{
int length,width;
int count;
cout << " Enter number of mesurements to input";
cin >> count;

for (int i=1; i <=count; i++)
{
get_data (length,width);
float Installedprice = length * width * float costpersqfoot + LABOR_COST;
cout << " Your installed price is" <<
setprecision(2) << length * width * float costpersqfoot + LABOR_COST + TAX_RATE << endl;
cout << " Your total price is" <<

}
system("PAUSE");
}
void get_data (length,width)
{
cout << " Enter length";
cin >> length;
cout << " Enter width:";
cin >> width;

}
float InstalledPrice (int length, int width)
{
return length * width * float costpersqfoot + LABOR_COST;
}
float totalprice (int length, int width)
{
return length * width * float costpersqfoot + LABOR_COST + TAX_RATE ;
}

Errr... what is it exactly that you want? I can't see any question marks in your post.

-Albatross
Oh sorry I'm just wondering if u could tell me what I did wrong cause when I try to compile it doesn't come out right I think I'm missing something in my code so if u could plaza help I would appreciate it.
Your get_data function has 3 formal parameters, and you only put two where you actually code it. You declared a float "costpersqfoot" without giving it and kind of operations.

float costpersqfoot = blah blah blah

then take out the return length * width * float costpersqfoot + LABOR_COST;

and just add costpersqfoot
Im sorry I'm new in programming what do I put float costpersqfoot=. because the user is suppose to enter the costpersqfoot lenght and the width and then the program just adds the tax and labor cost.
Thanks for all the help :)
You see the way you did
int count;
cout << " Enter number of mesurements to input";
cin >> count;


You're declaring an int variable called count.
You then say "Enter number of measurements to input"
cin >> count;

that statement is waiting for input from the user

You need a similar message to get the costpersqfoot.

declare a float variable costpersqfoot.
Ask the user to input the costpersqfoot.
Topic archived. No new replies allowed.