Respuesta :
By a simple construction of each step, we will see that the algorithm is:
- x = input value  (input the furniture cost)
- y = 1.7*x        (compute the markup value)
- z = 0.85*y      (apply the 15% discount).
How to write the algorithm?
The general algorithm will need the user to give an input, which will be the furniture cost, and then we will apply the correspondent increase/decrease to get the final value.
So the first step is to input the furniture cost.
1) x = input value of the furniture cost.
Then we apply the increase of the 70% increase, this means that we multiply it by 1.7
2) y = x*1.7
Notice that we defined a new variable, in the actual code you could use the same one.
Now we apply the decrease of the 15%, this means that we multiply by:
1 - 0.15 = 0.85
3) z = 0.85*y
Here we apply the discount to the markup price, not to the cost of the furniture which was the original input (and what you wrote in your algorithm).
Then the complete algorithm is:
- x = input value  (input the furniture cost)
- y = 1.7*x        (compute the markup value)
- z = 0.85*y      (apply the 15% discount).
And z would be the final price of the furniture item.
If you want to learn more about algorithms, you can read:
https://brainly.com/question/11623795