```
{
SumOddEven(A,n) //A is array and n is size of array
{
int count, sum;
for(int i = 1; i<=n; i++) {
sum_even=0;
sum_odd=0;
for(int j = i; j<=n; j++) {
if (A[j] Mod 2 == 0) //check if number is even
sum_even=sum_even+A[j] //Sum even numbers
else
sum_odd=sum_odd+A[j] //Sum odd numbers
}
cout<<sum_even;
cout<<sum_odd;
}
}
```

0