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

Ex Input:
int t, a, flag, a1;
/*bool prime(int k)
{
int j, sqrt_k;
if (k == 2)
return 1;
else
{
sqrt_k = sqrt((double)k);
for (j = 2; j <= sqrt_k; j++)
{
if (k % (int)j == 0)
break;
}
if (j == sqrt_k + 1)
return 1;
else
return 0;
}
}
/*
void find(int m)
{
int i;
if (prime(m))
{
flag = 1;
t++;
// cout << t << endl;
return;
}
for (i = 2; i <= sqrt((double) m); i++)
{
if ((m % i == 0) && (a1 <= i))
{
// cout << a1 << 2<< endl;
//cout << i << " " << 1 <<endl;
a1 = i;
//if (!prime(m / i))
t++;
// cout << t << endl;
find(m / i);
}
}
return;
}*/
void find(int m, int min)
{
int i;
//int a[];
for (i = 2; i <= sqrt((double)m); i++)
{
if (m % i == 0)
{
if (i >= min)
//if (a1 >= i)
{
t++;
// if (!/*((m / i > i) && */(prime(m / i)))
// cout << t << " ";
// cout <<i<<" " << m / i << " " << t <<endl;
// t++;
// cout << " " << a1 <<endl;
//cout << t<<endl;
// a1 = i;
min = i;
//cout << min << endl;
find(m / i, min);

}

}
}
/*if (i == (int)sqrt((double)m) - 1)
return;*/
return;
}
int main()
{
int n, ii;
cin >> n;
for (ii = 1; ii <= n; ii++)
{
t = 0;
flag = 0;
cin >> a;
// if (prime(a)) t--;
a1 = a;
find(a, 2);
cout << t + 1<< endl;
}

return 0;
}

Ex Output:
4

Ex Input:
/*
* 1000012850_34.1.cpp
* ????????????a??????????????? ?????????
* Created on: 2010-11-27
* Author: william
*/
int resolution_into_factors(int j,int i)
{
int m, sum=0, k=0;
for(m=j ;m<=sqrt(i); m++)
{
if(i%m==0)
{
sum=resolution_into_factors(m, i/m)+sum+1;
k++;
}
}
if(k==0) return 0;
return sum;
}
int main()
{
int n, k, i;
cin>>n;
for(k=1; k<=n; k++)
{
cin>>i;
cout<<resolution_into_factors(2,i)+1<<endl;
}
return 0;
}

Ex Output:
2

Ex Input:
int a[1000];
int l=0,x;
int fff(int w,int t,int x);
int main()
{
int i,j,q,p,n,m,y;
scanf("%d",&n);
for(p=0;p<n;p++)
{q=1;l=0;
scanf("%d",&x);
for(i=2;i<=x;i++)
if(x%i==0)
{a[q]=i;
q++;
}
fff(q-1,1,x);
printf("%d
",l,x);
}
}
int fff(int w,int t,int x)
{
int i,j,y,n,m,p;
for(i=t;i<=w;i++)
{if(x%a[i]==0)
{
x=x/a[i];
if(x==1){l++;}
if(x>1)
fff(w,i,x);
x=x*a[i];
}
}
}

Ex Output:
3