There is an N-box train.Find the value of j such that the following statement is true: "the i-th box from the front of the train is the j-th box from the back."
1 <= i <= N
Answers
Answered by
0
Answer:
j = N + 1 — i
explanation:
so, number of box behind the i-th box = j —1
number of box in front of the i-th box = i—1
N = (i—1) + ( j—1) + 1
or, N = I + j — 1
so, j = N + 1 — I
Similar questions