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

/*
 * 009.cpp
 *
 *  Created on: 2012-11-27
 *      Author: asus
 */
int varieties = 0;//??????


void divide(int forward, int number)//??divide??
{
 int i;
 if (number == 1)//????
    {
  varieties++;//??
 }
 for (i = forward; i <= number; i++)//forward???????,number?????,?forward?????
    {
  if (number % i == 0)//????
        {
	divide(i, number / i);
 }}}

int main()//???
{
	int n = 0, num = 0;
	cin >> n;//????
	for (int i = 1; i <= n; i ++)
		{cin >> num;
	divide(2, num);//??
	cout << varieties << endl;
		varieties = 0;
		}
	return 0;
}
2

/*
 * 1.cpp
 *
 *  Created on: 2010-12-1
 *      Author: ???
 *        ??? ????
 */



int g(int x,int j){
	for(j++;j<=x;j++){
		if(x==j)
			return 1;
		if(x%j==0&&x/j>=j)
			return g(x/j,j-1)+g(x,j);
	}
	return 0;
}

int main(){
	int n,a;
	cin>>n;
	for(int i=1;i<=n;i++){
		cin>>a;
		cout<<g(a,1)<<endl;
	}
	return 0;
}
2

/*
 *?????
 *???2010 - 12 - 07
 *?????????  ????
 */
int num(int,int,int);
int qufen(int);
int power(int,int);
int main()
{
	int t;
	cin >> t;
	while(t >= 1)
	{
		int n,i,x,sum = 1;
		cin >> n;
		x = qufen(n);                  //qufen????????????????????
		for(i = 2; i <= x; i++)
			sum = sum + num(n,i,2);      //num?????????????i????????
		cout << sum << endl;
		t--;
	}
	return 0;
}
int qufen(int n)
{
	int j;
	for(j = 1; ; j++)
	{
		if(power(2,j) > n)
		{
			return j - 1;
			break;
		}
	}
}
int power(int a,int b)
{
	int sum = 1,k;
	for(k = 1; k <= b; k++)             //?????????
		sum = sum * a;
	return sum;
}
int num(int n,int g,int h)
{
	if((g == 1)&&(n >= h))          //???????
		return 1;
	int i,j = 0,count = 0,a[20000];  
	for(i = h; i < n; i++)                 //???????????? n ?? i ?? g ??????n / i????? g - 1?
	{                                      //?n = i * ?g?? ???? n / i = h * (g - 1 ???h??????i???
		if(n % i == 0)
		{
			a[j] = i;
			j++;
		}
	}
	if(j == 0)                     //j == 0?????????????????
		return 0;
	else
	{
		for(i = 0; i < j; i++)
			count = count + num(n / a[i],g - 1,a[i]);
		return count;
	}
}

5