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

[EX Q]: int n, m, ans, a[20];

void calc(int dep, int x)
{
	if (x == 1)
	{
		ans++;
		return;
	}
	for (int i = a[dep-1]; i <= x; i++)
		if (!(x % i))
		{
			a[dep] = i;
			calc(dep + 1, x / i);
		}
}

int main()
{
	scanf("%d", &n);
	for (a[0] = 2;n; n--)
	{
		scanf("%d", &m);
		ans = 0;
		calc(1, m);
		printf("%d\n", ans);
	}
	return 0;
}
[EX A]: 2

[EX Q]: 

int num;
int dg(int m,int limit);

int main()
{
    int n;
    cin>>n;
    for (int i=1;i<=n;i++)
    {
        int m; cin>>m;
        num=0;
        dg(m,2);
        cout<<num<<endl;
    }
    return 0;
}
int dg(int m,int limit)
{
    for (int i=limit;i<=m/2;i++)
        if (m%i==0) dg(m/i,i);
    if (m>=limit) num++;
    return 0;
}


[EX A]: 2

[EX Q]: 
int countt;
void f(int p,int q)
{
	for(int m=p;m<=sqrt(q);m++)
	{
		if(q%m==0)
		{countt++;
		f(m,q/m);}
	}
   
}
int main()
{   
	int n,num,i;
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>num;
		countt=0;
		for(int k=2;k<=sqrt(num);k++)
		{   
		    if(num%k==0)
			{
				countt++;
			   f(k,num/k);
			}
		}
		cout<<countt+1<<endl;;
	}
	return 0;
}
[EX A]:
3

