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

/*
* ????1118-4.cpp
* ?????
* ????: 2011-11-29
* ??????????a?????????????????a = a1 * a2 * a3 * ... * an???1 < a1 <= a2 <= a3 <= ... <= an?????????????
*/
int divide(int n,int a)//n?????????a????????????????????
{
int s=0,i;
if(n==1) return 1;//n?1???
for(i=a;i>1;i--)
if(n%i==0)
s+=divide(n/i,i);//???????
return s;//??0??????????0??????????
}
int main()
{
int n,k;
cin>>k;//??????
while(k>0)//???????
{
cin>>n;//????????
cout<<divide(n,n)<<endl;//??????
k--;//?????????
}
return 0;//????
}

1

//**********************************************
//**???1090 ????*************************
//**?????? 1000012741*********************
//**???2010?12?7?*************************
//**********************************************
//??change???a???????p???????
int change (int a, int p)
{
int i, count = 0; //count??????????
for (i = p; i < a; i++)
{
if (a % i == 0 && a / i >= i) //??????????????
{
count++; //???1
int k, t;
k = (int) sqrt(a / i); //?k?a/i????
for (t = 2; t <= k; t++)
{
if ((a / i) % t == 0) //??a???2?k??????
{
count += change (a / i, i); //?a/i??????
break;
}
}

}
}
return count; //??count?
}
int main()
{
int n, i, a; //n?????????a?????
cin >> n;
for (i = 1; i <= n; i++)
{
int total = 0; //total?????
cin >> a;
total += change (a, 2); //??change??
cout << total + 1 << endl; //??1?????????????
}
return 0;
}
//**********************************************
3

int divide(int n,int j)
{
int sum=1,i,s,p,k;
s=sqrt(n);
for(i=j;i<=s;i++)
{
if (n%i==0)
{
p=n/i;
k=i;
sum=sum+divide(p,i);
}
}
return sum;
}
int main()
{
int n;
cin>>n;
int k,m,p;
for(k=0;k<n;k++)
{
cin>>m;
p=divide(m,2);
cout<<p<<endl;
}
return 0;
}
2