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

Example Input: //
//  main.cpp
//  123
//
//  Created by blues cookie on 12-11-12.
//  Copyright (c) 2012? blues cookie. All rights reserved.
//

int calc(int a,int b)
{
    if(a*a>b) return 1;
    if(b%a==0) return (calc(a,b/a)+calc(a+1,b));
    return calc(a+1,b);
}
int main(int argc, const char * argv[])
{
    int n,a;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>a;
        cout<<calc(2,a)<<endl;
    }
    return 0;
}
Example Output: 1

Example Input: int i,n,k;

int work(int p,int n)
{
	if (n==1) k++;
	for (int i=p;i<=n;i++)
		if (n%i==0) work(i,n/i);
}
int main()
{
	int m;
	cin>>m;
	while (m>0)
		{
     cin>>n;
     k=0;
     work(2,n);
					cout<<k<<endl;
					m--;
		}
	return 0;
}

Example Output: 1

Example Input: /****************************************
 * ????								*
 *										*
 *  Created on: 2010-12-8				*
 *      Author:??						*
 ***************************************/
int factor(int x,int y)						//?????????factor
{
	int i;
	for(i=2;i<x;i++)						//?????x?????
	{
		if(x%i==0)
		{
			break;
		}
	}
	if(i==x)
	{
		return 1;							//??x??????1
	}
	else									//????????????
	{
		int sum=0;
		if(x==y)							//?x?y?????y/x+1??????????????????????1???
		{
			for(i=y/x+1;i<=sqrt(x);i++)		//?????????????????
			{
				if(x%i==0)
				{
					sum=sum+factor(x/i,x);
				}
				else continue;
			}
			return sum+1;					//????sum+1?????????a=a???
		}
		else
		{									//?x?y??????y/x?????????
			for(i=y/x;i<=sqrt(x);i++)
			{
				if(x%i==0)
				{
					sum=sum+factor(x/i,x);
				}
				else continue;
			}
			return sum+1;					//????sum+1?????????a=a???
		}
	}
}
int main()									//?????
{
	int n;
	cin>>n;
	const int m=n;
	int a[m],j;
	for(j=0;j<n;j++)
	{
		cin>>a[j];							//???????
	}
	for(j=0;j<n;j++)
	{
		cout<<factor(a[j],a[j])<<endl;		//??????
	}
	return 0;
}

Example Output:
5