title: Odd-Even subarrays
body: <p>You are given an array A of N positive integer values. A subarray of this array is called Odd-Even subarray if the number of odd integers in this subarray is equal to the number  of even integers in this subarray.</p>
  
  <p><strong>Find the number of Odd-Even subarrays for the given array.</strong></p>
  
  <pre><code>int main(){
  int n,i,j,count=0,sum;
  scanf("%d",&amp;n);
   int arr[n];
  for(i=0;i&lt;n;i++){
      scanf("%d",&amp;arr[i]);
  }
  for(i=0;i&lt;n;i++){
      sum=0;
      for(j=i;j&lt;n;j+=2){
          sum+=(arr[j+1]+arr[j]);
          if(sum%2!=0)
                  ++count;
      }
  }
  printf("%d",count);
  return 0;}
  </code></pre>
  
  <p><strong>can anyone help me with my code</strong></p>