The sequence is given: 1, 3/2, 5/3, 7/4, 9/5, ... It is necessary to calculate the product from 1 to n of the sequence.
Hint throw up how to solve
I've tried to solve it using the general formula, but it gives the wrong numbers as a result
cin >> n for (int i = 1; i <= n; i++){ a_i = ((2 * i) - 1) / i; result = result * a_i; }