TASK DEFINITION: This task is to find the number of 'For' loops present in the given cpp program.
PROBLEM: int main()
{
	int f(int a,int min);
	int n,a[150],i,b;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
	for(i=0;i<n;i++)
	{
		b=f(a[i],2);
		printf("%d\n",b);
	}
	return 0;
}

 
int f(int a,int min)
{ 
	int result=1,i;
	if(a < min)
	{ 
	return 0; 
	} 
	for(i = min;i<a;i++)
	{ 
		if(a % i == 0)
		{ 
		result += f(a/i,i); 
		} 
	} 
	return result; 
} 

SOLUTION: 3

PROBLEM: int a[1000];
int l=0,x;
int fff(int k,int w,int t,int x);
int main()
{
    int i,j,q,p,n,m,y;
    scanf("%d",&n);
    for(p=0;p<n;p++)
       {q=1;l=0;
        scanf("%d",&x);
        for(i=2;i<=x;i++)
           if(x%i==0)
             {a[q]=i;
             q++;
             }
        fff(1,q-1,1,x);
        printf("%d\n",l,x);
       }
}
int fff(int k,int w,int t,int x)
{
    int i,j,y,n,m,p;
      for(i=t;i<=w;i++)
            {if(x%a[i]==0)
             {
             x=x/a[i]; 
             if(x==1){l++;}
             if(x>1)
                 fff(k+1,w,i,x);
             x=x*a[i];
             }
            }
}

            


SOLUTION: 3

PROBLEM: int c[1000]={0},d[1000],j;
main()
{
	void f();
	int i,s;
	scanf("%d",&s);
	for(j=0;j<s;j++)
	{
		scanf("%d",&d[j]);
	    for(i=2;i<=sqrt(d[j]);i++)
		{
		    if(d[j]%i==0)
			{
			    c[j]++;
			    f(i,d[j]/i);
			}
		}
	}
	for(j=0;j<s;j++)
	{
		printf("%d\n",c[j]+1);
	}
}
void f(int s,int m)
{
	int k;
	for(k=s;k<=sqrt(m);k++)
	{
		if(m%k==0)
		{
			c[j]++;
			f(k,m/k);
		}
	}
}


SOLUTION:
4