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

Ex Input:
int f(int x,int y) //???????????????y?????????x????????
{int i,num=0;
int a[100];
int sum=0;
for(i=x;i<=sqrt(y);i++){
if(y%i==0) {num++;a[num]=1+f(i,y/i);}} //??????
for(i=1;i<=num;i++) {sum=sum+a[i];}
return sum;
}

int main(){
int n,x,i,b[100];
cin>>n; //?????????
for(i=1;i<=n;i++){cin>>x;b[i]=x;}
for(i=1;i<=n;i++){cout<<f(2,b[i])+1<<endl;} //???????

return 0;

}

Ex Output:
4

Ex Input:
/****************************************
* ???? *
* *
* Created on: 2010-12-8 *
* Author:?? *
***************************************/
int factor(int x,int y) //?????????factor
{
int i;
for(i=2;i<x;i++) //?????x?????
{
if(x%i==0)
{
break;
}
}
if(i==x)
{
return 1; //??x??????1
}
else //????????????
{
int sum=0;
if(x==y) //?x?y?????y/x+1??????????????????????1???
{
for(i=y/x+1;i<=sqrt(x);i++) //?????????????????
{
if(x%i==0)
{
sum=sum+factor(x/i,x);
}
else continue;
}
return sum+1; //????sum+1?????????a=a???
}
else
{ //?x?y??????y/x?????????
for(i=y/x;i<=sqrt(x);i++)
{
if(x%i==0)
{
sum=sum+factor(x/i,x);
}
else continue;
}
return sum+1; //????sum+1?????????a=a???
}
}
}
int main() //?????
{
int n;
cin>>n;
const int m=n;
int a[m],j;
for(j=0;j<n;j++)
{
cin>>a[j]; //???????
}
for(j=0;j<n;j++)
{
cout<<factor(a[j],a[j])<<endl; //??????
}
return 0;
}

Ex Output:
5

Ex Input:
/*
* ways.cpp
*
* Created on: 2013-11-24
* Author: Mac
*/

int factor(int a, int f)
{
if(a == f)
return 1;
if (a < f)
return 0;
if(a%f == 0)
return factor(a, f+1) + factor(a/f, f);
else return factor(a, f+1);
}

int main()
{
int x, a;
cin >> x;
while(x > 0)
{
cin >> a;
cout << factor(a, 2) << endl;
x --;
}
}

Ex Output:
0