what is wrong in the below code ??
#include
using namespace std;
// Returns number of pairs in arr[0…n-1]
// with sum equal to ‘sum’
int printPairs(int arr[], int n, int target)
{
int count = 0; // Initialize result
// Consider all possible pairs and check
// their sums
for (int i = 0; i < n; i++)
for (int j = i + 1; j < n; j++)
if (arr[i] + arr[j] == target)
cout << "(" << arr[i] << ", "
<< arr[j] << ")" << endl;
}
// Driver function to test the above function
int main()
{
int n;
cin>>n;
int arr[n];
int target;
cin>>target;
for(int i=0;i<n;i++){
arr[i];
}
printPairs(arr, n, target);
return 0;
}