based on given input I want to calculate the number of days required to reach the top of the staircase.
There are total N of stairs. He climbs X stairs upwards in a day and he came downstairs in the night by Y stairs.
As I am an absolute beginner in math. I don't where to start. Basically I want to form an equation to solve this problem.
n = 100;
x= 5
y =1
Calculate his height at the end of each day:-
Day 1 $X$
Day 2 $2X-Y$
Day 3 $3X-2Y$
Can you now see a formula for his height at the end of Day $D$?
Equate your result to $N$ and you have the equation you want.