good evening folks. I've learned a lot from this page. However I was wondering if someone could lend me a hand as well. I've been assigned the same question in my C Programming class and unfortunately the professor is unwilling to help (well says hes unable to).

in anycase I actually have the same thing in terms of how Brandon uses paint.

Code:
         if( paint == 1 )
                 paint = 40;
    else
        if( paint == 2 )
                 paint = 30;
    else
        if( paint == 3 )
                 paint = 20;
now my options are "1" is for Premium paint charged at 40 dollars
option "2" for Regular at 30 dollars
option "3" for Basic at 20 dollars

at the end of my program. I want to calculate the costs and totals.

so the results should look like this

RESULTS:
Total Area: 1382 sq ft
Premium paint cost: $ 80.00
Regular paint cost: $ 76.80
Basic paint cost: $ 47.00
Labour costs: $376.40
TOTAL COST: $580.20

what i have so far is:

Code:
{              area=(length*height)+ceiling;
                printf("The total area is, %d sq.feet\n", area);
                paint=
                labour=(area/200)*2+setup;
                printf("Labour cost: %d\n", labour);
                room=(area*paint)*2;
                printf("room total: %d\n", room);
                total=room+labour;
                printf ("Total: $%d\n", total);}

now my issue is that i am unsure on how to incorporate paint into the formula based on the choices of paint the client requested.

when i run my program my end result is

The total area is, 122 sq.feet
Labour cost: 100
Room total: 0
Total: $0

now i think labour cost is wrong...because it says

"Labour costs include a setup cost of $100 plus $40 per 200 square feet (includes 2 coats) to be painted. Paint is obtained in bulk so the quote is to only include paint used"

so thats why in my formula i wrote
Labour=(area/200)*2+setup

divided by 200 for the per sq feet x 2 for the 2coats. 100 for the setup. I dont know where to add that "plus" 40. Im at a total loss lol.

And just as important, I dont know how to effectively make my questions loop until the user ends their selections for the totals :S.


apologies for the long post. Id greatly appreciate any help. I am using Matrix. And nled for writing up my program.