Write a program to determine the cost of painting a room

Assignment Help C/C++ Programming
Reference no: EM13699360

You need to implement the program to find the cost of painting a room

Question: Can anybody figure out how to calculate number of gallons of paint needed and the total cost?

Program: Write a program to determine the cost of painting a room. 

The program should allow the user to enter the height in feet of a room, the width in feet of one side of a room, the width in feet of the other side of a room, the number of square feet that a gallon of paint covers, and the price per gallon of paint. 

The program should calculate the number of gallons of paint needed and display the total cost of painting the room.  (NOTE:  You can only buy the paint in gallon size cans.)

Here are some sample test data & results:

HEIGHT WIDTH A WIDTH B SQ. FT. COST/GAL GALLONS   TOTAL COST

    10             12               14                350         $32.98         2                  $65.96

    12             15               20                400         $26.97         3                   $80.91

Be sure to include comments. Comments should be included in the program to explain your calculations and program.

Reference no: EM13699360

Questions Cloud

Store user input - write c++ program : Write C++ program to provide the following functionality - Ask users to enter 10 integer numbers.
What are the balanced net ionic equations : Problem- What is the chemical equation for the above. Is there a reaction? If so, what are the balanced 1) molecular, 2) ionic, 3) net ionic equations? What are the states in the net ionic equation
Implement a program to find the position of a cannonball : Write a C++ program that calculates the position of a cannonball that is fired straight up in the air - Implement a program to find the position of a cannonball
How many grams of iron oxide will be produced : Problem- If 6.50 L of water vapor at 50.2 c and 0.121 atm reacts with excess iron, how many grams of iron (lll) oxide will be produced
Write a program to determine the cost of painting a room : implement the program to find the cost of painting a room - Write a program to determine the cost of painting a room.
Find a popular childrens story and write it into an array : Prompt a user to search for a string within the array, returning the position of the search item within the array - Can you give the answer ASAP?
The value of j for the lower electronic-vibrational : Problem- Consider an electronic transition of a diatomic molecule in which the up- per electronic state has a larger equilibrium bond distance than the lower state. Determine the value of J for the lower electronic-vibrational state at which the t..
Lists of integers and displays whether the two are identical : Write a test program that prompts the user to enter two lists of integers and displays whether the two are identical. Here are the sample runs.
Prepare an acetate buffer of ph : Problem- You have 775 mL of an 0.11 M acetic acid solution. What volume (V) of 1.30 M NaOH solution must you add in order to prepare an acetate buffer of pH = 5.44? The pKa of acetic acid is 4.76.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  How the function delete can be implemented for arrays

Explain in details how the function Delete() can be implemented for arrays to function exactly as it would with lists. Use pseudo code to clarify your explanation.

  Displays a table showing the price of silver and gold

Write a C++ program that displays a table showing the price of silver and gold. The table will have three columns. The first column will be labeled Ounces, the second labeled Silver, and the third labeled Gold.

  Write c program-visual studio to scan multiple text files

Write program in C or C++ and Visual Studio to scan multiple text files and count number of occurrences of each word in those files. Use binary tree to keep track of all words.

  Write a c++ statement that outputs the data stored

Write a C++ statement that declares student to be a personType object, and initialize its first name to "Buddy" and last name to "Arora".

  The first will be a structure called point

Create two structures. The first will be a structure called Point and will have as its data members an x and y coordinate. The second will be called Line and will have two Point structures as its data members.

  Prepare a table showing loan amount

Write a C++ program that prints a table showing loan amount, interest rate, length of loan, monthly payments, and total cost of a mortgage.

  Write a small program to simulate a raffle

Write a small program to simulate a raffle (a gambling game) for a group with 100 members. You can simply identify each member with a no-duplicated ID numbers from 01 to 100. A number ticket with a positive 4-digits integer number will be randomly cr..

  Need to convert this c code to mips

You need to convert this C code to MIPS - The subsequent is a sample output (user input is 2): Enter an integer: 2 The count of the integers that are greater than 2 is: 3 You have to assure the requirements specific in the instruction.

  How many times will the inner loops s be executed

How many times will the inner loop's S be executed? Show HOW you got that answer.

  Questionnbspnbspi have a product called neverwet that

questionnbspnbspi have a product called neverwet that creates a hydrophobic surface on stuff. theres a base and top

  Up through 2 to the 10th power

program should compute and output all of the "powers of two" from 2 to the 0th power, up through 2 to the 10th power.

  What is the best way to output the result of a function

What is the best way to output the result of a function?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd