TASK DEFINITION: This task is to find the number of 'For' loops present in the given cpp program.
PROBLEM: int main()
{
int i,j,num[100],n,m;
int fj(int ,int );
scanf("%d",&n);
for(i=1;i<=n;i++)
scanf("%d",&num[i]);
for(i=1;i<=n;i++)
printf("%d
",fj(2,num[i]));

return 0;
}

int fj(int k,int n)
{
int c,i,sum=1;
if(n==2) return(sum);
else if(n==3) return(sum);
else
{
c=(int)sqrt(n);
for(i=k;i<=c;i++)
if(n%i==0) sum=sum+fj(i,n/i);
return(sum);
}
}

SOLUTION: 3

PROBLEM:
int f(int q,int x)
{
if(q<x)
{ int i,k,p,sum;
k=0;sum=0;p=0;
for(i=2;i<=x/2;i++)
if(x%i==0) k=k+1;
if(k==0) return 1;
else
{ for(i=q;i<=sqrt(x);i++)
if(x%i==0)sum=sum+f(i,x/i);

return sum+1;
p=0;
sum=0;
}
}
else
{ if(q==x) return 1;
else
return 0;
}
}

int main()
{
int n,i,x,sum;
scanf("%d",&n);

for(i=0;i<n;i++)
{
scanf("%d",&x);
sum=f(2,x);
printf("%d
",sum);
}
}

SOLUTION: 3

PROBLEM: int num(int a,int b,int c)//??????????
{
int sum=0,j;//sum????
if(a>c)return 0;//???????????????0
if(b==1)return 1;//????????????????
for(j=a;j<=c;j++)//?????????????
if(c%j==0)sum=sum+num(j,b-1,c/j);
return sum;
}
int main()
{
int k,n,m,e=0,i;//e??????
cin>>n;
while(e<n)
{
cin>>m;
k=0;//k??m????????????????
int f=m;
for(i=2;i<=f;i++)
if(f%i==0)
{
k++;
f=f/i;
i=1;
}
cout<<num(1,k,m)<<endl;//????????
e++;
}
return 0;
}

SOLUTION:
2