So for my C++ class, we were assigned to make a program to assess the cost of wooden desks. Although it's advised to not ask for homework answers, I can't seem to figure out the problem on this. Any tips will help. My teacher is super uptight about making the output look pretty; the program asks the user for the type of wood via a char variable and then will later output it on the "receipt". This is what I have currently:
What is your name?
Saturnz
What is the length of the desk?
4
What is the width of the desk?
2
What type of wood is it made of?
m = mahogany
o = oak
p = pine
p
Lastly, how many drawers does it have?
4
1 Customer name Saturnz
2 Desk length 4
3 Desk width 2
4 Number of drawers 4
5 Wood type Mahogany
Press any key to continue . . .
Sorry for all the annoying comments, they were part of the skeleton program we have to use.
All of the tests need to use the double equals ==, which is the "equality operator" and tests for equality, returning a boolean true or false (1 or 0) result.
All of the assignments need to use the single equals =, which is the "assignment operator" and sets the variable on the left to the value of the expression on the right.
You have some of those mixed up.
Look closely at every line, not just where you might think the problem is.