Question

C++ The manager of Keystone Tile wants an application that displays the area of a rectangular...

C++

The manager of Keystone Tile wants an application that displays the area of a rectangular floor, given its measurements in feet.

It should also display the total cost of tiling the floor, given the price per square foot of tile.

1-Create a new project named Intermediate13 Project, and save it in the Cpp8\Chap04 folder.

Enter your C++ instructions into a source file named Intermediate13.cpp.

Also enter appropriate comments and any additional instructions required by the compiler.

Test the program using the same data used to desk-check the program.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

/*
C++ program that prompts user to enter the lenght and width of the rectangle floor
and then prompt for price of sqt. Then calculate the total cost of the floor on the console output.
*/

//Intermediate13.cpp
#include<iostream>
#include<iomanip>
using namespace std;
//start of main function
int main()
{

   float length;
   float width;
   float area;
   float pricePerSFT;
   float totalCost=0;

   cout<<"Keystone Tile"<<endl;
   //read length of the floor
   cout<<"Enter length of The Floor :";
   cin>>length;
   //read width of the floor
   cout<<"Enter width of The Floor :";
   cin>>width;
   cout<<"Enter price per square feet :$";
   cin>>pricePerSFT;

   //area of the rectangle area
   area=length*width;

   //calculate the total cost of the floor
   totalCost=area*pricePerSFT;
   //print the total cost
   cout<<"Total cost of the rectangle floor : $"<<totalCost<<endl;

   system("pause");
   return 0;
}

-------------------------------------------------------------------------------------------------------------------

Sample Output:

Sample run1:

Keystone Tile
Enter length of The Floor :5
Enter width of The Floor :10
Enter price per square feet :$1.5
Total cost of the rectangle floor : $75

Sample run2:

Keystone Tile
Enter length of The Floor :10
Enter width of The Floor :15
Enter price per square feet :$1.0
Total cost of the rectangle floor : $150

-------------------------------------------------------------------------------------------------------------------

Desk-Checking with sample values

Add a comment
Know the answer?
Add Answer to:
C++ The manager of Keystone Tile wants an application that displays the area of a rectangular...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Can someone help me with a c++ program Create a program that displays a measurement in...

    Can someone help me with a c++ program Create a program that displays a measurement in either inches or centimeters. If necessary, create a new project named Introductory 18 Project, and save it in the Cpp8\Chap09 folder. The program should allow the user the choice of converting a measurement from inches to centimeters or vice versa. Use two program-defined functions: one for each different conversion type. Enter your C++ instructions into a source file named Introductory 18.cpp Also enter appropriate...

  • chapter 7. Create a program that allows the user to enter the ages (in years) of...

    chapter 7. Create a program that allows the user to enter the ages (in years) of five people. The program should display the average age. Use the for the statement. Display the average age with one decimal place. If necessary, create a new project named TryThis15 Project, and save it in the Cpp8\Chap07 folder. Enter the C++ instructions into a source file named TryThis15.cpp. Also, enter appropriate comments and any additional instructions required by the compiler. Test the program using...

  • Mountain Coffee wants a program that allows a clerk to enter the number of pounds of...

    Mountain Coffee wants a program that allows a clerk to enter the number of pounds of coffee ordered, the price per pound, and whether the customer should be charged a 3.5% sales tax. The program should calculate and display the total amount the customer owes. Use an int variable for the number of pounds, a double variable for the price per pound, and a char variable for the sales tax information. a. Create an IPO chart for the problem, and...

  • 25. In this exercise, you create a program for the sales manager at Computer Haven, a...

    25. In this exercise, you create a program for the sales manager at Computer Haven, a small business that offers motivational seminars to local companies. Figure 7-53 shows the charge for attending a seminar. Notice that the charge per person depends on the number of people the company registers. For example, the cost for four registrants is $400; the cost for two registrants is $300. The program should allow the sales manager to enter the number of registrants for as...

  • An online retailer wants a program that displays the total amount a customer owes, including shipping....

    An online retailer wants a program that displays the total amount a customer owes, including shipping. The user will enter the total amount due before shipping. The amount to charge for shipping is based on the customer's membership status, which can be either Standard or Premium. The appropriate shipping charges are shown in Figure 9-42. The program should use two program-defined functions: one to determine the shipping charge for a Standard member and the other to determine the shipping charge...

  • What am I doing wrong here...…. Question is this : In this exercise, you will create...

    What am I doing wrong here...…. Question is this : In this exercise, you will create a program that displays a table consisting of four rows and three columns. The first column should contain the numbers 10 through 13. The second and third columns should contain the results of squaring and cubing, respec- tively, the numbers 10 through 13. The table will look similar to the one shown in Figure 9-38. If necessary, create a new project named Introductoryl6 Project,...

  • Follow the instructions for starting C++ and viewing the Intermediate23.cpp file, which is contained in either...

    Follow the instructions for starting C++ and viewing the Intermediate23.cpp file, which is contained in either the Cpp8IChap11\Intermediate23 Project folder or the Cpp8\Chap11 folder. (Depending on your C++ development tool, you may need to open the project/solution file first.) The program uses an array to store the amount of money a game show contestant won in each of five days. The program should display the total amount won and the average daily amount won. It should also display the day...

  • INSTRUCTIONS #6. Your science teacher has asked you to create an application that displays how much...

    INSTRUCTIONS #6. Your science teacher has asked you to create an application that displays how much a person would weigh on the following planets: Venus, Mars, and Jupiter. The application's interface should allow the user to enter the person's weight on Earth. Perform the steps involved in creating an OO application. (See the Note at the beginning of the Exercises section.) Include a button for clearing the screen. . Create an application, using the following names for the solution and...

  • MAKE IT DIFFERENT WAYS TO RUN IT: Design an application for each of the following problems...

    MAKE IT DIFFERENT WAYS TO RUN IT: Design an application for each of the following problems writing the pseudocode for each; include a UML diagram if appropriate. Be sure to follow the CSI 117 Style Criteria for naming conventions, class diagrams, pseudocode, keywords, and operators. 1. Wood Trim, Inc. wants a program that will allow its sales clerks to enter the length (in feet) of the trim ordered by a customer and the price of one foot of trim. Design...

  • Project 1, Program Design 1. Write a C program replace.c that asks the user to enter...

    Project 1, Program Design 1. Write a C program replace.c that asks the user to enter a three-digit integer and then replace each digit by the sum of that digit plus 6 modulus 10. If the integer entered is less than 100 or greater than 999, output an error message and abort the program. A sample input/output: Enter a three-digit number: 928 Output: 584 2. Write a C program convert.c that displays menus for converting length and calculates the result....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT