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

Q: //n???????i?????????
int divi(int n,int i)
{
    int num=0;
    if(n%i==0)
    {
        if(n==i)      //?????????????????1 
        {
            return 1;
        }
        for(int j=2;j<=i;j++)
        {
             num=num+divi(n/i,j);   //?? 
        }
           return num;
    }
        
    else
    {
        return 0;
    }               
}

int main()
{
    int n=0;  //????? 
    int t=0;  //???? 
    int sum;  //????? 
    cin>>t;  
    for(int i=0;i<t;i++)
    {
        sum=0;
        cin>>n;
        for(int j=2;j<=n/2;j++)   //?????????1*n??? 
        {
            sum=sum+divi(n,j);
        }
        cout<<sum+1<<endl;
    }
    return 0;
}


A: 3
****
Q: //* * * * * * * * * * * * * * * * * * * * * * * * 
//*????????                             *
//*???????? .cpp                        *
//*?????  1000012839                       *
//*???2010.12.04                             *
//* * * * * * * * * * * * * * * * * * * * * * * * 


int ways(int a, int min);	//	????ways?????????a??????,a??????min?
int main()
{
	int n, a, i, sum = 0, k, min;	//	n?????????,a????????????i,k?a??????min??????sum?
	cin >> n;
	for (i = 0; i < n; i++)
	{
		cin >> a;
		sum = 0;
		for (k = 2; k <= a; k++)
		{
			if (a % k == 0)
			{
				min = k;
				break;
			}
		}	//	???????
		if (a != min)
			sum = ways(a, min);	//	??a??????????
		else
			sum = 1;	//	??a?????????????
		cout << sum << endl;
	}
	return 0;
}
int ways(int a, int min)	
{
	int result = 1, i;	//	result????1??a = a???,i??????
	if(a < min)
		return 0;	//	????????????? 
	for (i = min; i < a; i++)
	{		
		if (a % i == 0)
			result += ways(a / i, i);	//	?????i??a/i????????????
	}
	return result;
}



A: 3
****
Q: /*
 * 11.27.cpp
 *
 *  Created on: 2011-11-27
 *      Author: Administrator
 */
int coun;                    // ???????
void depart(int n,int i)
{
   int j;
   if (n==1) coun++ ;
   else for (j=i;j<=n;j++)       //???j?? ??????
	   if (n%j==0) {depart(n/j,j);}
}

int main (){
	int n,j;
	cin>>n;
	int b[n];                   //???????
	for(j=0;j<n;j++)
		cin>>b[j];
	for(j=0;j<n;j++)
		{
		coun=0;               //?????
		depart(b[j],2);
		cout<<coun<<endl;
		}
	return 0;
}


A:
3
****