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

Ex Input:
int t, a, flag, a1;
/*bool prime(int k)
{
	int j, sqrt_k;
	if (k == 2)
		return 1;
	else
	{
		sqrt_k = sqrt((double)k);
		for (j = 2; j <= sqrt_k; j++)
		{
			if (k % (int)j == 0)
				break;
		}
		if (j == sqrt_k + 1)
			return 1;
		else
			return 0;
	}
}
/*
void find(int m)
{
	int i;
	if (prime(m))
	{
		flag = 1;
		t++;
	//	cout << t << endl;
		return;
	}
	for (i = 2; i <= sqrt((double) m); i++)
	{
		if ((m % i == 0) && (a1 <= i))
		{
		//	cout << a1 << 2<< endl;
			//cout << i <<  " " << 1 <<endl;
			a1 = i;
			//if (!prime(m / i))
				t++;
		//	cout << t << endl;
			find(m / i);
		}
	}
	return;
}*/
void find(int m, int min)
{
	int i;
	//int a[];
	for (i = 2; i <= sqrt((double)m); i++)
	{
		if (m % i == 0)
		{
			if (i >= min)
			//if (a1 >= i)
			{
				t++;
		//	if (!/*((m / i > i) && */(prime(m / i)))
			//	cout << t << " ";
			//	cout <<i<<" " << m / i << " " << t <<endl;
			//	t++;
			//	cout << " " << a1 <<endl;
				//cout << t<<endl;
			//	a1 = i;
				min = i;
				//cout << min << endl;
				find(m / i, min);
				
			}
			
		}
	}
	/*if (i == (int)sqrt((double)m) - 1)
		return;*/
	return;
}
int main()
{
	int n, ii;
	cin >> n;
	for (ii = 1; ii <= n; ii++)
	{
		t = 0;
		flag = 0;
		cin >> a;
	//	if (prime(a)) t--;
		a1 = a;
		find(a, 2);
		cout << t + 1<< endl;
	}

	return 0;
}

Ex Output:
4


Ex Input:
int dividemin(int a,int minyinzi){
	int num=0;
	if(a==1)num++;
	else for(int i=minyinzi;i<=a;i++)
	{
		if(a%i==0)num=num+dividemin(a/i,i);
	}
	return num;
}
int main(){
	int n;
	cin>>n;
	int a[n];
	for(int i=0;i<=n-1;i++)
		cin>>a[i];
	for(int i=0;i<=n-1;i++)
		//cout<<divide(a[i],a[i])<<endl;
		cout<<dividemin(a[i],2)<<endl;




}

Ex Output:
3


Ex Input:

int sum(int a,int i)
{
	int ret=1;
	for(;i<=sqrt((float)a);i++)
	{
		if(a%i==0)
		{
			ret+=sum(a/i,i);
		}
	}
	return ret;
}
int main()
{
	int t,a,j;
	cin>>t;
	
	for(j=0;j<t;j++)
	{
		cin>>a;
		cout<<sum(a,2)<<endl;
	}
	return 0;
}

Ex Output:

2