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

Ex Input:
void main()
{

	int f(int ,int );
	int n[100],sum,i,m;
	scanf("%d",&m);
	for(i=0;i<m;i++)
	scanf("%d",&n[i]);
	for(i=0;i<m;i++)
	{
		sum=f(1,n[i])+1;
	printf("%d\n",sum);
	}

}


int f(int i,int n)
{
	int j,k,sum=0;
	for(j=i;j<(int)sqrt((double)n)+1;j++)
	{
		
		k=sum;
		if(j==1)sum=0;
	    else
		{
			if(n%j==0&&n/j>=j)
		{
			sum=f(j,n/j)+1;
		}
			else sum=0;
		}
		sum=sum+k;

	}
	return(sum);
}

	

Ex Output:
3


Ex Input:
/*
 *?????
 *???2010 - 12 - 07
 *?????????  ????
 */
int num(int,int,int);
int qufen(int);
int power(int,int);
int main()
{
	int t;
	cin >> t;
	while(t >= 1)
	{
		int n,i,x,sum = 1;
		cin >> n;
		x = qufen(n);                  //qufen????????????????????
		for(i = 2; i <= x; i++)
			sum = sum + num(n,i,2);      //num?????????????i????????
		cout << sum << endl;
		t--;
	}
	return 0;
}
int qufen(int n)
{
	int j;
	for(j = 1; ; j++)
	{
		if(power(2,j) > n)
		{
			return j - 1;
			break;
		}
	}
}
int power(int a,int b)
{
	int sum = 1,k;
	for(k = 1; k <= b; k++)             //?????????
		sum = sum * a;
	return sum;
}
int num(int n,int g,int h)
{
	if((g == 1)&&(n >= h))          //???????
		return 1;
	int i,j = 0,count = 0,a[20000];  
	for(i = h; i < n; i++)                 //???????????? n ?? i ?? g ??????n / i????? g - 1?
	{                                      //?n = i * ?g?? ???? n / i = h * (g - 1 ???h??????i???
		if(n % i == 0)
		{
			a[j] = i;
			j++;
		}
	}
	if(j == 0)                     //j == 0?????????????????
		return 0;
	else
	{
		for(i = 0; i < j; i++)
			count = count + num(n / a[i],g - 1,a[i]);
		return count;
	}
}

Ex Output:
5


Ex Input:
int turn(int a,int b)
{
	int i,k;
	if(a==1) k=1;
	else if(a<b) k=0;
	else
	{
		k=0;
		for(i=b;i<=a;i++)
			if(a%i==0)
				k=k+turn(a/i,i);
	}
	return k;
}
int main()
{
	int n,i,a[1000],t;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		t=turn(a[i],2);
		printf("%d\n",t);
	}
	return 0;
}

Ex Output:

2