C++
write a function that will find the product of the first nnumbers from a number i to j. The function will receive 3 integerparameters (n, i and j) and find the respective product.
Solution
#include <iostream>using namespace std;int product(int n, int i, int j) { int result = 1; for(int num = i, count = 0; num <= j && count < n; num++, count++) { result *= num; } return result;}int main() { cout << product(2, 2,
OR
OR