Check if sum of arr[i] / j for all possible pairs (i, j) in an array is 0 or not

Check if sum of arr[i] / j for all possible pairs (i, j) in an array is 0 or notGiven an array arr[] consisting of N integers, the task is to check if the sum of all possible values of (arr[i] / j) for all pairs (i, j) such that 0 < i ≤ j < (N – 1) is 0 or not. If found to be true, then print “Yes”. Otherwise, print “No”.Examples:Input: arr[] = {1, -1, 3, -2, -1}Output: YesExplanation:For all possible pairs (i, j), such that 0 < i   =>  From the above observations, if the sum of the array is 0, then print Yes. Otherwise, print No.Below is the implementation of the above approach:C++#include using namespace std;void check(int arr[], int N){        int sum = 0;        for (int i = 0; i < N; i++)        sum += arr[i];        if (sum == 0)        cout