Please check my solution,what is the mistake?

#include
using namespace std;
// int sum_array(int a[1000],int b[1000]){
// int sum=0,new[1000];
// for(int i=0;i<n;i++){
// new[n-1]=a[n-1]+b[m-1];

// }
// }

int main(){
int n,m,left,right,a[1000],b[1000];
cin>>n;
int ne[1000];
for(int i=n-1;i>=0;i–){

	cin>>a[i];
	left=a[i];
}
cin>>m;
for(int i=m-1;i>=0;i--){
	
	cin>>b[i];
	right=b[i];

	
}

if(m>n){

for(int i=m-1;i>=0;i--){int carry=0;
			
	ne[i]=a[i]+b[i]+carry;

	
	if(ne[i]>=10){
		int rem=ne[i]%10;
	carry+=ne[i]/10;

		ne[i]=rem;

	// ne[i-1]=a[i-1]+b[i-1]+carry;

			
		
	}	
	cout<<ne[i]<<",";
}

}

if(m<=n){

for(int i=n-1;i>=0;i--){int carry;
	ne[i]=a[i]+b[i]+carry;
	
	
	if(ne[i]>=10){
		int rem=ne[i]%10;
	carry=ne[i]/10;

		ne[i]=rem;
			
		
	}
	// ne[i-1]=a[i-1]+b[i-1]+carry;

	cout<<ne[i]<<",";
}

}
return 0;
}

@Kshubham1532,
Please share Coding Blocks IDE link of your code. Don’t just copy paste the code here. Also make sure your code compiles before you share the link.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.