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

[EX Q]: /*
 * hehe.cpp
 *
 *  Created on: 2012-11-25
 *      Author:??
 * ???????a?????????????????a = a1 * a2 * a3 * ... * an?
 * ??1 < a1 <= a2 <= a3 <= ... <= an?????????????????a = a???????
 */

int sum = 1;//??????Sum
int Fact(int x, int y);

int main() {
	int n, a;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> a;
		sum = 1;//????sum
		Fact(a, 2);//????
		cout << sum << endl;
	}
	return 0;
}
int Fact(int x, int y) {
	if (x == 1)
		return 0;//???1???0
	else {
		for (; y <= sqrt(x); y++)//????????
			if (x % y == 0) {
				sum = sum + Fact(x / y, y); //????????Fact(??y)
			}
		return 1;
	}

}

[EX A]: 2

[EX Q]: int c[1000]={0},d[1000],j;
main()
{
	void f();
	int i,s;
	scanf("%d",&s);
	for(j=0;j<s;j++)
	{
		scanf("%d",&d[j]);
	    for(i=2;i<=sqrt(d[j]);i++)
		{
		    if(d[j]%i==0)
			{
			    c[j]++;
			    f(i,d[j]/i);
			}
		}
	}
	for(j=0;j<s;j++)
	{
		printf("%d\n",c[j]+1);
	}
}
void f(int s,int m)
{
	int k;
	for(k=s;k<=sqrt(m);k++)
	{
		if(m%k==0)
		{
			c[j]++;
			f(k,m/k);
		}
	}
}

[EX A]: 4

[EX Q]: int sum=0;
void recur(int N,int i)
{
    if(N==1) sum++;
    while(i<=N)
    {
        if(N%i==0) 
			recur(N/i,i);
        i++;
    }
    return ;
}
int main()
{
    int t=0;
    cin>>t;
    for(int k = 0; k < t; k++)
    {
        int n=0;
        cin>>n;
        int i=2,res=1;
        for(int i =2; i <=n/2;i++)
        {
            if(n%i==0)
            {
                sum=0;
                recur(n/i,i);
                res+=sum;
            }
        }
        cout<<res<<endl;
    }
    return 0;
}

[EX A]:
2

