This task is to find the number of 'For' loops present in the given cpp program.

Ex Input:
int main()
{
int digui(int p,int q); 
int n,i,j;
scanf("%d",&n);
for(i=0;i<n;i++)
{
int a,sum=1;
scanf("%d",&a);
for(j=2;j<a;j++)
{if(j*j>a)
break;
else if(a%j==0)
sum=sum+digui(j,a/j);
}
printf("%d\n",sum);
}
}
int digui(int p,int q)
{
int z=1,d;
if(p==q)
z=1;
else if(p>q)
z=0;
else
for(d=p;d<q;d++)
{if(d*d>q)
break;
else if(q%d==0)
z=z+digui(d,q/d);
}
return(z);
}

Ex Output:
3


Ex Input:
/*
 * ????.cpp
 *  Created on: 2012-11-19
 *  Author:???
 */
int f(int a,int b){//?a???????b?????????
	int num=1,i;
	for(i=b;i<=sqrt(a);i++){//??b?a???????????a?
		if(a%i==0)num+=f(a/i,i);//????a??????????a??????????i??????
	}
	return num;//????
}
int main(){
	int i,n,a;
	cin>>n;//???????
	for(i=1;i<=n;i++){
		cin>>a;
		cout<<f(a,2)<<endl;//???????
	}
	return 0;
}


Ex Output:
2


Ex Input:
int a[1000];
int l=0,x;
int fff(int k,int w,int t,int x);
int main()
{
    int i,j,q,p,n,m,y;
    scanf("%d",&n);
    for(p=0;p<n;p++)
       {q=1;l=0;
        scanf("%d",&x);
        for(i=2;i<=x;i++)
           if(x%i==0)
             {a[q]=i;
             q++;
             }
        fff(1,q-1,1,x);
        printf("%d\n",l,x);
       }
}
int fff(int k,int w,int t,int x)
{
    int i,j,y,n,m,p;
      for(i=t;i<=w;i++)
            {if(x%a[i]==0)
             {
             x=x/a[i]; 
             if(x==1){l++;}
             if(x>1)
                 fff(k+1,w,i,x);
             x=x*a[i];
             }
            }
}

            


Ex Output:

3