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

Example Input:
int function(int a, int m)
{
int sum=1,i;
if(a>m)
return 0;
else
{
for(i=a;i<m;i++)
{
if(m%i==0)
sum=sum+function(i,m/i);
else
continue;
}
return sum;

}
}

void main()
{
int n,i,m[100];

scanf("%d",&n);

for(i=0;i<=n-1;i++)
{
scanf("%d",&m[i]);
}

for(i=0;i<=n-1;i++)
{
printf("%d
",function(2,m[i]));

}
}

Example Output: 3

Example Input: int num=0;
int sum(int a,int i)
{

if(a==1)
{
num++;
}
else
{
while(i<=a)
{
if(a%i==0)
{
sum(a/i,i);
}
i++;
}
}
return num;
}
int main()
{
int a,t,j,i,count;
cin>>t;
for(j=0;j<t;j++)
{
count=1;
cin>>a;
i=2;
while(i<=(a/2))
{
if(a%i==0)
{
num=0;
sum(a/i,i);
count=count+num;
}
i++;
}
cout<<count<<endl;
}

return 0;
}

Example Output: 1

Example Input: /*
* h35.cpp
* function:????
* Created on: 2012-11-30
* Author: sear
*/
//m????n???????????n???n??m,????n,???n??1
int f(int m, int n) { //m???,n????????
int i, sum = 0; //i?????,sum???????
if (n == 1)
return 1; //???????1???1
for (sum = 0, i = m; i <= n; i++)//?????????????????m???????m???
if (n % i == 0)
sum += f(i, n / i);//?n???????????n??i????
return sum; //??sum???????
}
int main() {
int i, n, k; //i?????,n????????,k?????????
for (i = 0, cin >> n; i < n; i++) {
cin >> k; //???????
cout << f(2, k) << endl;//???????
}
return 0; //????
}

Example Output:
2