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

[EX Q]: int a[40000]={0};
void fun(int n,int j,int k){
     int i;
     for(i=j;i<=sqrt(n);i++){
                             if(n%i==0){
                                        j=i;
                                        a[k]++;
                                        fun(n/i,j,k);
                                        }
                             }
                             
     }
      
int main()
{
  int n;
  int m[40000]={0};
  int i;
  scanf("%d",&n);
  for(i=1;i<=n;i++){ scanf("%d",&m[i]);}  
  for(i=1;i<=n;i++){fun(m[i],2,i);}
  for(i=1;i<=n;i++){ printf("%d\n",a[i]+1);} 
 
	
  return 0;
}

[EX A]: 4

[EX Q]: int main()
{
	int f(int a,int min);
	int n,a[150],i,b;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
	for(i=0;i<n;i++)
	{
		b=f(a[i],2);
		printf("%d\n",b);
	}
	return 0;
}

 
int f(int a,int min)
{ 
	int result=1,i;
	if(a < min)
	{ 
	return 0; 
	} 
	for(i = min;i<a;i++)
	{ 
		if(a % i == 0)
		{ 
		result += f(a/i,i); 
		} 
	} 
	return result; 
} 
[EX A]: 3

[EX Q]: int f(int m,int min);
int main()
{
	int n,m,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&m);
		printf("%d\n",f(m,2));
	}
	return 0;
}
int f(int m,int min)
{
	int count=1,i;
	if(m==1)
		return 1;
	else if(m == 2)
		return 1;
	else
	{
		for(i=min;i<=sqrt(m);i++)
		{
			if(m%i==0)
			{
				count += f(m/i,i);
			}
		}
		return count;
	}
}
[EX A]:
2