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

Ex Input:
/*
 * 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 Output:
2


Ex Input:
int fenjie(int n,int min)
{
int x=0,i;
if(n==1)
return 1;
else
{
	for(i=min;i<=n;i++)
	{
		if(n%i==0)
		x=x+fenjie(n/i,i);}
}
return x;}
main()
{int shu;
	int number,count=1;
	scanf("%d",&number);
	while(count<number)
	{
		scanf("%d",&shu);
		printf("%d\n",fenjie(shu,2));
	count++;	}
	scanf("%d",&shu);
	printf("%d",fenjie(shu,2));
		
}

Ex Output:
1


Ex Input:
//***************************************
//* ?????2010?12?01?            *
//* ?????????                  *
//* ?????         ???1000012902 *
//***************************************
int factors(int, int, int);                    //????factors?????????????
int main() 
{
	int num, n, i, j, b[10000];
	cin >> n;                                  //??????
	for (i = 0; i < n; i++) 
	{
		cin >> num;
		int part = 0;                          //??????????
		int t = num;                           //????

		//??????1????????????
		for (j = 2; j <= num; j++)
		{
			while (t % j == 0)
			{
				t /= j;
				part++;
			}
		}
		b[i] = factors(1, part, num);          //?????????????, ??????????
	}

	//?????????
	for (i = 0; i < n; i++)
	{
		cout << b[i] << endl;
	}
	return 0;
}

//factor1????????????????????factor1, part??????????????????????????, num???????? 
int factors(int factor1, int part, int num)
{
	int sum = 0;                               //????????0, ???0
	if (num < factor1)                         //?????????????????, ???0?????????????
		return 0;
	if (part == 1)                             //?????????, ??1??????????
		return 1;

	//???????????????????????????????????????????, ????????
	for (int i = factor1; i <= num; i++)
		if (num % i == 0)
			sum = sum + factors(i, part - 1, num / i);
	return sum;
}

Ex Output:

4