recursive counting on c
<p>Good Day! I have a problem on counting in recursion, this code is already in the net, but i did some addition code on it, my problem is how to count the IF part of the program? , this is the code:</p>

<pre><code>#include &lt;stdio.h&gt;
#include &lt;math.h&gt;

int combinationUtil(int arr[], int data[], int start, int end, int index, int r,float MEAN);

int printCombination(int arr[], int n, int r,float MEAN)
{

int data[r];

combinationUtil(arr, data, 0, n-1, 0, r,MEAN);
}


int combinationUtil(int arr[], int data[], int start, int end, int index, int r,float MEAN)
{
int j,i,a=1,b=0,f=0,ch,total=0;
float sum=0,mean,deviation=0,standard_deviation;



if (index == r){
        int count=0;

    for (j=0; j&lt;r; j++)
    {

       sum=sum+data[j];
        deviation=deviation+pow((MEAN-data[j]),2);
    }

   mean=sum/r;
   standard_deviation=sqrt(deviation/(r-1));

   if(MEAN&lt;=(mean+(2.776*standard_deviation))&amp;&amp; MEAN&gt;=(mean-(2.776*standard_deviation))){
    printf("%d",a); 
    count++;}
  else printf("%15d",b); 
  count=count;

   return ;}



 for (i=start; i&lt;=end &amp;&amp; end-i+1 &gt;= r-index; i++)
  {

    data[index] = arr[i];
    combinationUtil(arr, data, i+1, end, index+1, r,MEAN);

  }

  }




int main()
{
int arr[] = {2,4,6,8,10,7,8};
int r = 3,i,count=1,total=0;
int n = sizeof(arr)/sizeof(arr[0]);
float sum=0,MEAN;
for(i=0; i&lt;n; i++)
{
    sum=sum+arr[i];
}
MEAN=sum/n;
printf("MEAN=%f\n\n\n",MEAN);


printCombination(arr,n,r,MEAN));


return 0;
}
</code></pre>

<p>This is the output: </p>

<p><img src="https://i.stack.imgur.com/0SU7m.png" alt="enter image description here"></p>