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

[EX Q]: 
int dp[40000][200]={0};
int main()
{
    int n,i,N;
    int mm( int , int );
    
    cin>>n;
    for(i=1;i<=n;i++)
    {
                     cin>>N;
                     cout<<mm(N,2)<<endl;
                   // if(prime(N)) cout<<"haha";
    }
   
    return 0;
}

int mm( int n, int i)
{
    int sum=1;
    
    if(dp[n][i]>0) return dp[n][i];
    
    
    for(int j=i; j<=sqrt(n);j++)
    {
             if(n%j==0)
             {
                       sum += mm(n/j,j);
             }
    }
    dp[n][i]=sum;
    return sum;
}
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
  

[EX A]: 2

[EX Q]: 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 A]: 3

[EX Q]: int fact(int n,int m);//????fact
int main()//?????
{
	int n,a[35000],i,b[35000];
	cin>>n;
	for(i=0;i<n;i++)cin>>a[i];//???????????
	for(i=0;i<n;i++)b[i]=fact(a[i],2);//?????????????????fact(a[i],2)
	for(i=0;i<n;i++)cout<<b[i]<<endl;//????????
	return 0;
}//?????
int fact(int n,int m)//fact??
{
	int sum=1,i,temp=0;
	if(n<m)return 0;//?n<m,?????0
	else if(n==2)return 1;//?n???2??????1
	else
	{
			for(i=m;i<n;i++)//??????m?n
	{if(n%i==0)sum=sum+fact(n/i,i);}//?n??i????sum??fact(n/i,i)??,????
	return sum;
	}
}//fact??
[EX A]:
4