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

[Q]: int sum=0;
void f(int x,int y)
{
if(x==1)
sum++;
while(y<=x)
{
if(x%y==0)
f(x/y,y);
y++;
}
}
int main()
{
int n,i,a;
cin>>n;
for(i=1;i<=n;i++)
{
cin>>a;
int j=2,num=1;
while(j<=a/2)
{
if(a%j==0)
{
sum=0;
f(a/j,j);
num+=sum;
}
j++;
}
printf("
%d",num);
}
return 0;
}

[A]: 1

[Q]: int Divide(int a,int b);
int main()
{
int Times=0;
int Num=0;
int i=0;
int Temp[100]={0};
cin>>Times;
for (i=0;i<Times;i++)
{ cin>>Num;
Temp[i]=Divide(Num,Num);
}
for (i=0;i<Times;i++)
{cout<<Temp[i]<<endl;}
return 0;
}

int Divide(int a,int b)
{
int Sum=0;
int i=0;
int Flag=0;
if (a!=1)
{ for (i=b;i>1;i--)
{if (a%i==0)
Sum+=Divide(a/i,i);
Flag=1;
}
}
if (Flag==0||a==1)
{Sum=1;}
return Sum;
}

[A]: 3

[Q]: /*
* ???? .cpp
*
* Created on: 2012-11-27
* Author:??
* ???????a?????????????????a = a1 * a2 * a3 * ... * an?
* ??1 < a1 <= a2 <= a3 <= ... <= an?????????????????a = a???????
*/

int answer = 0;//???????
void f(int n, int N) {
if (n < N)
N = n;//????????????
if (N == 1) {
answer++;//??????
return;
}
while (N > 1) {
if (n % N == 0)
f(n / N, N);//?????,?????
N--;//??????
}
}

int main()
{
int n , a ;
cin >> n ; //????n
for ( int i = 0 ; i < n ; i++ )
{
cin >> a ;
f( a , a ) ; //????
cout << answer << endl ;
answer = 0 ; //????
}
return 0 ;
}

[A]:
1