Help

closed account (oi37ko23)
I need a program that will allow a user to enter the width,height,and hours taken to build a frame.I have the program working but I am getting the wrong answer when i try to enter an additional frame. This will also have to be in a loop that will allow the user to enter as many frames as they want.
I have the calculations :
perimeter=2*width+height
area=width*height
subtotal=(3.75*perimeter)+(8.35*area)+(16*hours)
tax=0.085*subtotal
total=tax+subtotal
This is not C or C++ code.
However, if translated literally to C or C++, your calculation for perimeter is wrong.
Operator precedence dictates that (2*width) is calculated first, then height is added. Not what you want.

Please post your complete code using code tags (the <> formatting button).
Can not tell from what little you posted what other problems might exist.

BTW, we will not write the program for you, but will help you with any problems you have.
Last edited on
Topic archived. No new replies allowed.