0

can some one start me off i'm lost


Write a C++ program that calculates customers’ bills for building a desk. The main ( ) function shall call four functions (described below). Pass all variables so that the functions make copies of any variables they receive.

The following four functions are required:

a.The getDrawers function shall accept as input from the keyboard the numbers of drawers in the desk. This function shall return the number of drawers to the main program.

b.The getWood function shall accept as input the type of wood:
‘m’ - for mahogany
‘o’ – for oak
‘p’ – for pine.

c.The computePrice function shall receive the drawer number and wood type, and
Calculate the cost of the desk based on the following:
Pine desks are $100
Oak desks are $140
All other woods are $180

A $30 surcharge is added for each drawer. This function shall return the cost to the main ( ) function.

d. The displayPrice function shall display the final price.

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by Ancient Dragon
0

Do the requirements one small function at a time. Code, compile, fix erorrs, then compile again. Repeat that until all errors have been fixed before doing any more of the program. You can start like this:

#include <iostream>

int getDrawers ()
{
   // put your code here
}

// make other required functions similar to above

int main()
{
    // put your code here
}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.