Why doesn't my code run properly. Please show me how to get this to work.
#include <iostream>
using namespace std;
int main (){
int nums[3]= {3,2,4};
int arr2[2];
int target = 6;
for (int i=0; i<3; i++) {
for (int j=i+1; j<3; j++){
if ([i]+[j]==target;
arr2[0]=i;
arr2[1]=j);
}
cout >> arr2[];
}
return arr2;
}
```