C++ Homework to be done
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(float, float, float, float *);
void printInfo(float, float, float, float);
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 *hightP, float *lengthP, float *widthP, float*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 hight, float length, float width, float*numSqrFtPerCan)
{
}
void printInfo(float hight, float length, float width, floatnumPaintCans)
{
}
10 years ago
7