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

Input: Consider Input: int s=0,p;
int a[100];
void factor(int m,int n,int t){
	int i;
	for(i=2;i<=(int)sqrt(n);i++)
		if((n%i==0)&&(i>=m)){
			s++;
			factor(i,n/i,t+1);
		}
	return;
}
int main(){
	int i,j=0,k;
	scanf("%d",&j);
	for(k=0;k<j;k++)
		scanf("%d",&a[k]);
	for(k=0;k<j;k++){
		p=a[k]; s=0;
	for(i=2;i<=(int)sqrt(p);i++)
		if(p%i==0){
		s++;
		factor(i,p/i,2);
		}
		a[k]=s;
	}
	for(k=0;k<j;k++)
		printf("%d\n",a[k]+1);
	return 0;
}

Output: 5


Input: Consider Input: void fun(int m, int i);                                                  //????
int num ;
int main()
{
	int n, i, a;
	cin>>n;
	for(i = 0; i < n; i++)
	{
		cin>>a;
		num = 0;
		fun(a, 2);                                                      //????
		cout<<num + 1<<endl;                                            //???????a=a???????num??1
	}
	return 0;
}
void fun(int m, int i)
{
	int k = sqrt(m);
	for(i = i; i <= k; i++)
	{
		if(m % i == 0)
		{
		         num++;                           
			fun(m / i, i);                                             //?????????
		}
	}
}

Output: 2


Input: Consider Input: int main()
{
    int a[10000],b[10000],p,q,m,n,i,j;
    scanf("%d",&n);
    for(i=0;i<n;i++){
                     scanf("\n%d",&a[i]);
                     }
    for(i=0;i<n;i++){
                     printf("%d\n",ans(a[i],2));
                     }
    return 0;
}

int ans(int sum,int min)
{
    int w,x,u=1;
    for(w=min;w<sum/2;w++){
                         x=sum%w;
                         if(x==0){
                                  if(w<=sum/w)
                                  u+=ans(sum/w,w);
                                  }
                         }
    return u;
}


Output: 3