Here are the known facts: Customer knows how many rooms are to be replaced. Meas
ID: 3615303 • Letter: H
Question
Here are the known facts:
Customer knows how many rooms are to be replaced.
Measurements for any room is in feet no decimal -length/width
Square footage is rounded to the highest yard. One square yardis equal to 9 square feet. An example of round up: 20 sq ft = 20/9square yards = 2.2222 square yards; by rounding it up, it countsfor 3 square yards.
Install cost is $5 per yard.
Cost of Carpeting per Square Yard is input for each room.
Padding cost is based on:
Each room can have a different padding.
Explanation / Answer
#include #include #include using namespace std; int main() { int roomCount; /* Figure out how many rooms there are so we candetermine our array size */ cout > roomCount; /* Make arrays for each of our variables withthe size of how many rooms there are */ double *width = new double[roomCount]; double *length = new double[roomCount]; int *sqyrd = new int[roomCount]; int *carpetcost = new int[roomCount]; int *padding = new int[roomCount]; int *roomCost = new int[roomCount]; int *totPadding = new int[roomCount]; double grandSqft = 0; int grandCarpetCost = 0; int grandInstallCost = 0; int grandRoomCost = 0; for(int i = 0; iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.