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

Ex Input:
int sum = 0;
void f(int a,int s)
{
int i;
if(a == 1)
sum++;
else
{

for(i = s; i <= a; i++)
{
if(a % i == 0)
f((a / i),i);
}
}
return;
}

int main()
{
int n, num, j;
cin >> n;
for (j = 1; j <= n; j++)
{
cin >> num;
f(num,2);
printf("%d
",sum);
sum = 0;

}
return 0;
}

Ex Output:
2

Ex Input:
int sum=0;
int main()
{ void shu(int a,int b);
int n=0,i=0,a=0,c=0,j=0;
scanf("%d",&n);
for(i=1;i<=n;i++)
{ scanf("%d",&a);
for(j=2;j<=sqrt((double)a);j++)
{ if(a%j==0)
{ sum=sum+1;
shu(j,a/j);
}

}

printf("%d",sum+1);
if(i<n)
printf("
");
sum=0;

}

return(0);
}
void shu(int a,int b)
{ int i=0;
for(i=a;i<=sqrt((double)b);i++)
{ if(b%i==0)
{ sum=sum+1;
shu(i,b/i);

}
}
}

Ex Output:
3

Ex Input:
//????
int divide(int n,int i); //???? n???????i?????????
int main()
{
int n=0; //?????
int t=0; //????
int sum; //???????
cin>>t;
for(int i=0;i<t;i++)
{
sum=0;
cin>>n;
for(int j=2;j<=n/2;j++) //???????????1*n???
{
sum=sum+divide(n,j);
}
cout<<sum+1<<endl;
}
return 0;
}
int divide(int n,int i) //???????????????1???
{
int num=0;
if(n%i==0)
{
if(n==i) //?????????????????1
{
return 1;
}
for(int j=2;j<=i;j++)
{
num=num+divide(n/i,j); //??
}
return num;
}

else
{
return 0;
}
}

Ex Output:
3