This task is to find the number of 'For' loops present in the given cpp program.
--------
Question: int sum=0;
void f(int x,int y)
{
	if(x==1)
		sum++;
	while(y<=x)
	{
		if(x%y==0)
			f(x/y,y);
		y++;
	}
}
int main()
{
	int n,i,a;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a;
		int j=2,num=1;
		while(j<=a/2)
		{
			if(a%j==0)
			{
				sum=0;
				f(a/j,j);
				num+=sum;
			}
			j++;
		}
		printf("\n%d",num);
	}
	return 0;
}


Answer: 1


Question: /*
 * ????.cpp
 *  Created on: 2012-11-19
 *  Author:???
 */
int f(int a,int b){//?a???????b?????????
	int num=1,i;
	for(i=b;i<=sqrt(a);i++){//??b?a???????????a?
		if(a%i==0)num+=f(a/i,i);//????a??????????a??????????i??????
	}
	return num;//????
}
int main(){
	int i,n,a;
	cin>>n;//???????
	for(i=1;i<=n;i++){
		cin>>a;
		cout<<f(a,2)<<endl;//???????
	}
	return 0;
}


Answer: 2


Question: /*
 *????HW7_10.cpp
 *??????1100019007?
 *???2012-11-14 
 *???1090 ???? 
 */ 
int factorize(int m,int k)
{
    int c=1;//a=a??? 
    if(m<4)return 1;//?m??4??1 
    for(int i=k;i<=sqrt(m);i++)if(!(m%i))c+=factorize(m/i,k>i?k:i);//????????????????an>an-1,???k???
    return c;//????? 
}
int main(int argc, char *argv[]){
    int n,m;
    cin>>n;
    while(n--){
        cin>>m;//????
        cout<<factorize(m,2)<<endl;//????
    }
    return 0;}


Answer:
1