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

int main()
{
    int count(int x,int y);
    int i,j,n,a[100],b[100];
    scanf("%d", &n);
    for(i=1;i<=n;i++){scanf("%d", &a[i]);}
    for(i=1;i<=n;i++){
                      b[i]=0;
                      for(j=2;j<=a[i];j++){
                                        b[i]+=count(a[i],j);
                                        }
                      }
    for(i=1;i<=n;i++){printf("%d\n", b[i]);}
    return 0;
}
    
int count(int x,int y)
{
    int c=0,k;
    if(x==y){c=1;}
    if(x%y!=0){c=0;}
    if(x!=y&&x%y==0){
         for(k=y;k>=2;k--){c+=count((x/y),k);}
         }
    return(c);
}

5

int sum = 0;
void fenjie(int t,int n)
{
	int i = 0;
	if(n == 1)
	    sum++;
    for(i = t; i <= n; i++)
	{
		if(n % i == 0)
		{
			fenjie(i, n / i);
		}
	}
}
int main()
{
	int n = 0, k = 0;
	cin >> n;
	while(n > 0)
	{
		 cin >> k; 
         sum = 0;
		 fenjie(2,k);
		 n--;
		 cout << sum <<endl;
	}
	return 0;
}
1

/*
 *  Created on: 2011-11-18
 *      Author: 1100012870
 */

int su[40000],b[10000],ans;

void zhaosushu()
{
	int i,j,p;
	for(i=2;i<32768;i++)
	{
		p=1;
		for(j=2;j<=sqrt(i);j++)
			if(i%j==0){
				p=0;
				break;
			}
		if(p==0)continue;
		su[p]=1;
	}
}

void resolve(int a,int x)
{
	int i;
	if(a==1 || (su[a]==1 && a>=b[x-1])) {
		ans++;
		return;
	}
	for(i=2;i<=a;i++)
		if(a%i==0 && i>=b[x-1]){
			b[x]=i;
			resolve(a/i,x+1);
			b[x]=0;
		}
}

int main()
{
	int n,i,a;
	memset(su,0,sizeof(su));
	zhaosushu();
	cin>>n;
	for(i=1;i<=n;i++)
	{
		cin>>a;
		ans=0;
		memset(b,0,sizeof(b));
		resolve(a,1);
		cout<<ans<<endl;
	}
	return 0;
}

4

