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

Ex Input:
int num=0;
int judge1(int n)
{
int i;
if(n==2||n==3||n==5)
return 1;
if(n==4)
return 0;
for(i=2;i*i<n;i++)
{
if(n%i==0)
{return 0;break;}
}
if(i*i>n)
return 1;
}
void divide(int n,int d)
{
for(int i=d;i*i<=n;i++)
{
if(n%i==0)//&&judge1(i))
{
num++;
divide(n/i,d);
}
d++;
}
}
int main()
{
int n,m;
cin>>n;
while(n)
{
n--;
cin>>m;
num=1;
divide(m,2);
cout<<num<<endl;
}
return 0;
}

Ex Output:
2

Ex Input:
int count;
void fun(int m,int n)
{ if(m <=sqrt(n)){
for (int a=m;a <=sqrt(n);a++)
{
if(n%a==0){
count ++; fun (a,n/a);}
else count=count;
}}
else count=count;
}
main()
{
int n;scanf("%d",&n);
for (int i =0;i<n;i++)
{
count=0;
int num;scanf("%d",&num);
for(int j=2;j<=sqrt(num);j++)
{
if(num%j==0)
{count ++; fun(j,num/j);}
}
printf ("%d
",count+1);
}}

Ex Output:
3

Ex Input:
int t=0,ways; //??????t?ways
void divide(int x,int h)
{
int i;
if(x==1) //??x==1
{t++;ways=t;} //t+1?ways?????t
else
for(i=h;i<=x;i++)
if(x%i==0)
{h=i;
divide(x/h,h); //h?????????????divide?????????
}
}
int main()
{
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++)
{cin>>a[i];
t=0;divide(a[i],2);
cout<<ways<<endl;}
return 0;
}

Ex Output:
2