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

Ex Input:


int f(int a, int b)
{
    int k = 0;
    if (a >= 2 * b)
    {
        for (int i = b; i <= a / b; i++)
        {
            if (a % i == 0 && a/i >= i)
            {
                k += f(a/i, i) + 1;
            }
        }
    }
    else
    {
        k = 0;
    }
    return k;
}

int main()
{
    int n, a, t;
    cin >> n;
    while (n--)
    {
        cin >> a;
        t = f(a, 2) + 1;
        cout << t << endl;
    }
    return 0;
}


Ex Output:
1


Ex Input:

int count(int x,int y)//????????? 
{
    if(x<y) return 0;//???? 
    if(x>=y) 
    {
      int sum=0;
      for(int j=y;j<x;j++)
      {
        if(x%j==0)
        sum=sum+count(x/j,j);//??? 
      }
      return sum+1;
    }
} 
int main()
{
    int n;
    cin>>n;
    int a[n];
    for(int i=0;i<n;i++)
    cin>>a[i];
    for(int i=0;i<n;i++)
    cout<< count(a[i],2) <<endl; 
    return 0;
}


Ex Output:
3


Ex Input:
int sushu(int b)
{
	int flag=1,i;
	if(b==2)
		return 1;
	if(b%2==0)
		return 0;
	for(i=2;i<=b/2;i++)
	{
		if(b%i==0)
		{
			flag=0;
			break;
		}
	}
	if(flag==0)
		return 0;
	else 
		return 1;
}
int number(int a,int b)
{
	int i,total=1;
	if(sushu(a))
	{
		total=1;
		return total;
	}
	for(i=b;i<=a;i++)
	{
		
		if(a%i==0&&a/i>=i)
		{
			total=total+number(a/i,i);
		}
	}
	return total;
}
void main()
{
	int n,i,A[100],B[100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&A[i]);
		B[i]=number(A[i],2);
	}
	for(i=0;i<n;i++)
	{
		printf("%d\n",B[i]);
	}
}

Ex Output:

4


