C++ Homework to be done

profilex-hakai-x

I want someone to do this assignment.. it has two questions.  I have almost done the second one. it needs a little change. 

 

the questions are attached..

 

my incomplete program ( second question ):

 

 

#include <iostream>

 

using namespace std;



 

 

 

// fuction prototypes



 

 

void askForInputs(float *, float *, float *, float *);



void calcNumPaintCans(floatfloatfloatfloat *);



void printInfo(floatfloatfloatfloat);



int main()

 

 



{



 

float hight; float length; float width; float numPaintCans; floatnumSqrFtPerCan;



float *hightPtr = &hight, *lengthPtr = &length, *widthPtr = &width;float *numSqrFtPerCanPtr = &numSqrFtPerCan;

 

 



askForInputs(hightPtr, lengthPtr, widthPtr, numSqrFtPerCanPtr);



 

cout << 
"To paint the walls and ceiling of a room that has ";



cout << "a length of " << hight << " ft, ";



cout << "width of " << length << " ft, ";



cout << "height of " << width << " ft, ";



cout << "where each can of paint covers" << numSqrFtPerCan << " sft";



cout << "\n"; system("pause");

 

 



}



 

void askForInputs(float *hightPfloat *lengthPfloat *widthPfloat*numSqrFtPerCanP)

 

 



{



 

cout << 
"Please enter hight: ";



cin >> *hightP;



cout << "Please enter length: ";



cin >> *lengthP;



cout << "Please enter width: ";



cin >> *widthP;



cout << "Please enter the number of square feet a can of paint: ";



cin >> *numSqrFtPerCanP;

 

 







}



 

void calcNumPaintCans(float hightfloat lengthfloat widthfloat*numSqrFtPerCan)

 

 







}



 

void printInfo(float hightfloat lengthfloat widthfloatnumPaintCans)

 

 



{



}



 

 

  • 10 years ago
  • 7
Answer(0)