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

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);//???????????????????
		}
	}
}


A: 1
****
Q: 
// ????.cpp : ??????????????
//


int f(int x,int y)
{
	int i,a=1;
	if(x<y) return 0;
	if(x==y) return 1;
	if(x>y)
	{
		if(y==1)
		{
			for(i=y+1;i<=x;i++)
			{
				if(x%i==0) a=a+f(x/i,i);
			}
		}
		else
		{
			for(i=y;i<=x;i++)
			{
				if(x%i==0) a=a+f(x/i,i);
			}
		}
		return a;
	}
}

int main()
{
	int n,j,b=0,p,k;
	scanf("%d",&p);
	for(k=1;k<=p;++k)
	{
	scanf("%d",&n);
	b=f(n,1);
	printf("%d\n",b);
	}
	return 0;
}


A: 3
****
Q: int b[40000]={0};
void zhishu(int n)
{
     int i,j;
     for(i=2;i<sqrt(n);i++)
     {
                     for (j=2;j<n/i+1;j++)
                     {
                         b[i*j]=1;
                     }
     }
}
int fenjie(int n,int m)
{
    int s=0,i;
    if (n<m) return 0;
    if (n==m||b[n]==0) return 1;
    for (i=m;i<n;i++)
    {
        if (n%i==0)
        {
                  s=s+fenjie(n/i,i);
        }
    }
    return s+1;
}
int main()
{
    int n,i,max=0,a[1000];
    cin>>n;
    for (i=0;i<n;i++) 
    {
        cin>>a[i];
        if (a[i]>max) max=a[i];
    }
    zhishu(max);
    for (i=0;i<n;i++) cout<<fenjie(a[i],2)<<endl;
    return 0;
}


A:
5
****