This task is to find the number of 'For' loops present in the given cpp program.
--------
Question: 
int fg(int k,int m)
{
    int j,d=0;
	if (m==1)
	{
       d=1;
	}
   	for(j=k;j<=m;j++)
	{
		if (m%j==0)
			d=d+fg(j,m/j);
	}
	return(d);
}

int main()
{
	int n,i,a[40000],b[40000],s;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
	}
	for(i=1;i<=n;i++)
	{
		b[i]=fg(2,a[i]);
		printf("%d\n",b[i]);
	}
	return 0;
}

Answer: 3


Question: int sum=1 ;
int kk(int a,int b)
{
	int i;
	for(i=b;i>=2;i--)
	    if(a%i==0)
			return a/i;
		return 0;
}
int seperate(int a,int b)
{
	int i;
	for(i=b;i>=2;i--)
	{
		if(a%i==0&&(a/i)<=i)
		{sum++;if((a/i)==2)continue;else seperate(a/i,a/i-1);}
		else if((a%i==0)&&((kk(a/i,i))!=0))
		{
			seperate(a/i,i);
		}
		
	}
	return sum;
}
int main()
{
	int n,i,m;
	cin>>n;
	
	for(i=1;i<=n;i++)
	{
		cin>>m;
		cout<<seperate(m,m-1)<<endl;
		sum=1;
	}
	return 0;
}


Answer: 3


Question: int wtf(int p,int a);
int main()
{
int n,i,a,p;
scanf("%d",&n);
for(i=0;i<n;i++)
{
  scanf("%d",&a); 
  printf("%d\n",wtf(2,a));                  
}    
return 0;    
}

int wtf(int p,int a)
{  
    int i,ways=0,j=0; 
    int m=(int)sqrt(a);        
    for(;p<=m;p++)    
        {if(a%p==0 && a>=p*p )    {ways=ways+wtf(p,a/p);j++;}}     
    if(j==0)
    return 1;
    else 
    return ways+1;
}


Answer:
2