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

[EX Q]: int sum=0;//???????????
void fact(int a,int i)//?????;??????????a?????i?????
{
    if(a==1) sum++;//???????N=1????????N????????1
    while(i<=a)//????i???N
    {
        if(a%i==0) fact(a/i,i);//??N??i?????????????N/i??
        i++;//??N???i???i?1
    }
}
int main()//???
{
    int n;//?????????
    cin>>n;//??????
    while(n--)//??
    {
        int a;//??????????
        cin>>a;//????
        int i=2;//???????2?
		int result=1;//????????a??????
        while(i<=a/2)//??i???a???
        {
            if(a%i==0)//??i?a???
            {
                sum=0;//sum??
                fact(a/i,i);//????????/i
                result+=sum;//????????i????
            }
            i++;//i?1
        }
        cout<<result<<endl;//??????
    }
    return 0;
}

[EX A]: 0

[EX Q]: int sum=0,used[32770]={0};//????sum???????????used?i???i????????
void f(int n)//??f??n????????
{
	for(int i=2;i<=n;i++)
	{
		if(n%i==0&&used[i]==0)
		{
			if(i!=2)
			{
				for(int j=2;j<=i-1;j++)
					used[j]=1;
			}
			if(n/i==1)//??????????
			{
				sum++;
				break;
			}
			else
			{
				f(n/i);
			}
			memset(used,0,sizeof(used));//?used???????
		}
	}
}
int main()
{
	int m,a[100];
	cin>>m;
	for(int i=1;i<=m;i++)
	{
		cin>>a[i];
		if(a[i]==1)
			cout<<1<<endl;
		else
		{
			f(a[i]);
			cout<<sum<<endl;
			sum=0;//??
			memset(used,0,sizeof(used));
		}
	}
	return 0;
}
[EX A]: 3

[EX Q]: //*****************************
//* ???????            *
//* ??????              *
//* ???2010-12-7           *
//*****************************
int num=1,flag=2;//????1?????,?????
void way(int);
int main()
{
	int a,n;
	cin>>n;
	while(n--)
	{
		cin>>a;
		way(a);
		cout<<num<<endl;
		num=1;
		flag=2;//???
	}
	return 0;

}
void way(int a)
{
	int i,max;
	max=sqrt(a);
	for(i=flag;i<=max;i++)//?????????????????????
	{
		if(a%i==0)//????????
		{
			flag=i;//??
			num++;
			way(a/i);//???????????????????
		}
	}
}

[EX A]:
1