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

Ex Input:
void main()
{
int ways(int a, int min);
int n,b;
scanf("%d",&n);
while(n-->0)
{
scanf("%d",&b);
printf("%d
",ways(b,2));
}
}
int ways(int a, int min)
{
if(a<min) return 0;
int sum=0,i;
for(i=min;i<=sqrt(a*1.0);i++)
{
if(a%i == 0)
sum = sum + ways(a/i, i);
}
return sum+1;
}

Ex Output:
1

Ex Input:

int p(int a,int m)
{
int t=0;
int i;
if(a%m!=0)
return 0;
if((a%m==0)&&(a/m<m)&&(a!=m))
return 0;
if(a==m)
return 1;
if((a%m==0)&&(a/m>=m))
{
for(i=m;i<=a/m;i++)
{t=t+p(a/m,i);}
return t;
}
}

int main()
{ int n;
cin>>n;
int i;
int x;
int j;
int num=0;
for(i=0;i<n;i++)
{
cin>>x;
for(j=2;j<=x;j++)
{
num=num+p(x,j);
}
cout<<num<<endl;
num=0;
}

return 0;
}

Ex Output:
3

Ex Input:
int times;
void fenjie(int m,int k)
{
int i;
{
for(i=k;i<=sqrt(m);i++)
{
if(m%i==0)
{
fenjie(m/i,i);
}
}
}
times++;
}
int main()
{
int n,i;
scanf("%d",&n);
for(i=0;i<n;i++)
{
int m;
times=0;
scanf("%d",&m);
fenjie(m,2);
printf("%d
",times);
}
}

Ex Output:
2