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

/*
 *???: ????.cpp
 *??????
 *????: 2012-11-12
 *??: ????????????
 */


int count(int num, int m)
//???????????????????a1????????????
{
    if (num % m != 0) return 0;
    
    if (num == m) return 1;
    else {
        int counter = 0;
        for (int i = m; i <= num / m; i++){
                counter += count(num / m, i);
        }
        return counter;
    }
}

int main ()
{
    int n,num;
    cin >>n;
    for (int i = 1; i <= n; i++){
        int counter = 0;
        cin >> num;
        for (int i = 2; i <= num; i++)
            counter += count(num,i);//a1???2???m???
        cout << counter << endl;
    }
    return 0;
}
3

/*
 * h35.cpp
 * function:????
 * Created on: 2012-11-30
 * Author: sear
 */
//m????n???????????n???n??m,????n,???n??1
int f(int m, int n) {			//m???,n????????
	int i, sum = 0;				//i?????,sum???????
	if (n == 1)
		return 1;				//???????1???1
	for (sum = 0, i = m; i <= n; i++)//?????????????????m???????m???
		if (n % i == 0)
			sum += f(i, n / i);//?n???????????n??i????
	return sum;					//??sum???????
}
int main() {
	int i, n, k;				//i?????,n????????,k?????????
	for (i = 0, cin >> n; i < n; i++) {
		cin >> k;				//???????
		cout << f(2, k) << endl;//???????
	}
	return 0;				//????
}

2

int sushu(int a)
{
	int b=2,c,d=0,k;
		while (b<a)
		{
			c=a%b;
			if (c!=0)
			{
				b=b+1;
				d=d+1;}
		else break;
		}
		
		if(d==(a-2))
			k=1;
		else
			k=0;
	return k;
} 
int zheng(int n,int i)
{
	int sum=1,a;
	for(a=i;a<n/2;a++)
	{
		if(n%a==0)
		{
			if(a<=n/a)
			{
				sum=sum+zheng(n/a,a);
			}
		}
	}
	return sum;
}
int main ()
{
	int n,i,j=0,k=0,b[10000]={0},e[40000]={0};
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&e[i]);
	}
	for(i=0;i<n;i++)
	{
		
		if(sushu(e[i])==0)
		{
			b[i]=zheng(e[i],2);
		}
		else
		{
			b[i]=1;
		}

	}
	
	printf("%d",b[0]);
	for(i=1;i<n;i++)
		printf("\n%d",b[i]);
	return 0;
}

4