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

Ex Input:

int sum[50];
int i;

int main()
{
	void digui(int x, int y);
	int n;
	int j[50],m[50];


	scanf("%d",&n);

	for(i=0;i<n;i++)
	{	
		scanf("%d",&m[i]);
		sum[i]=0;
		for (j[i]=2;j[i]*j[i]<=m[i];j[i]++)
		{
			if(m[i]%j[i]==0)
			{
				sum[i]++;
				digui(j[i],m[i]/j[i]);
			}
		}
		printf("%d\n",sum[i]+1);
	}

	return 0;
}

void digui(int x, int y)
{
	int s;
	for(s=x; s*s<=y; s++) 
	{
		if(y%s==0) 
		{
			sum[i]++;
			digui(s,y/s);
		}
	}
}


Ex Output:
3


Ex Input:
int a[1000];
int l=0,x;
int fff(int k,int w,int t,int x);
int main()
{
    int i,j,q,p,n,m,y;
    scanf("%d",&n);
    for(p=0;p<n;p++)
       {q=1;l=0;
        scanf("%d",&x);
        for(i=2;i<=x;i++)
           if(x%i==0)
             {a[q]=i;
             q++;
             }
        fff(1,q-1,1,x);
        printf("%d\n",l,x);
       }
}
int fff(int k,int w,int t,int x)
{
    int i,j,y,n,m,p;
      for(i=t;i<=w;i++)
            {if(x%a[i]==0)
             {
             x=x/a[i]; 
             if(x==1){l++;}
             if(x>1)
                 fff(k+1,w,i,x);
             x=x*a[i];
             }
            }
}

            


Ex Output:
3


Ex Input:

int function(int n,int a)
{
	int kind=0;
	int i;
	if(n==1)
	return 1;
	for(i=a;i<=n;i++)
	{
		if(n%i==0)
		{
			if(n/i<i&&i!=n);
			else
			{
				kind=kind+function(n/i,i);
			}
		}
	}
	return kind;
}

int main()
{
	int m,n,i,sum;
	cin>>m;
	for(i=1;i<=m;i++)
	{
		cin>>n;
		sum=function(n,2);
		cout<<sum<<endl;
	}
	return 0;
}

Ex Output:

2