Array target sum pairTake as input N, the size of array. Take N more inputs and store that in an array. Take as input “target”, a number. Write a function which prints all pairs of numbers which sum to target

if i do run code thier is no error but after submitting code it shows no output
#include
int fun(int target, int n ,int m)
{ int i;
int N;
int arr[N];

std::cin>>target;
for(i=0;i<=N;i++)
{ 
	if(arr[i]+arr[i+1]==target){
		arr[i]=n;
        arr[i+1]=m;
	std::cout<<n<<"and"<<m;}
}

return n;
return m;
}

int main() {
int N;
int i;
int n;
int m;
std::cin>>N;
int arr[N];
for(i=0;i<=N;i++)
{
std::cin>>arr[i];
}
fun(5,n,m);

return 0;
} this is my code

Plz send your code by saving on ide.

you are assigning the value of n and m to the array instead of assigning value stored in an array to the number and also you are only checking for simultaneous pairs which is not necessary.