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

Ex Input:


int main()
{
	int n,i;
	int a,num(int,int);
	
	cin>>n;
	for (i=0;i<n;i++)
	{
		cin>>a;
		cout<<num(2,a)+1<<endl;
	}	
	return 0;
}

int num(int m,int n)
{
	int i,count=0;
	int su(int);
	for (i=m;i<=(int)sqrt(n);i++)
		if (n%i==0)
		{
			count++;
			if (su(n/i)!=0)
				count+=num(i,n/i);
		}
	return count;
}

int su(int n)
{
	int i;
	for (i=2;i<n;i++)
		if (n%i==0)
		{
			return 1;
			break;
		}
	if (i==n)
		return 0;	
}

Ex Output:
3


Ex Input:
int f(int,int);
int main()
{
	int n,i,a,b[100];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a);
		b[i]=f(a,2);
	}
	for(i=0;i<n;i++)
	{
		printf("%d\n",b[i]);
	}
	return 0;
}
int f(int x,int y)
{
	int j,sum=1;
	if(x<y)
		sum=0;
	else
	{
		for(j=y;j<x;j++)
		{
			if(x%j==0)
				sum=sum+f(x/j,j);
		}
	}
	return sum;
}


Ex Output:
3


Ex Input:
int num=0;
void count(int m,int j)
{
	int i;
	if(m==1) num++;
	for(i=j;i<=m;i++)
	{
		if(m%i==0) {count(m/i,i);}
		else continue;}
}
int main()
{
	int n,i;
	cin>>n;
	for(i=1;i<=n;i++)
	{
		int m;
		cin>>m;
		num=0;
		count(m,2);
		cout<<num<<endl;
	}
	return 0;
}


Ex Output:

2