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

int d(int,int);
int main()
{
int i,n,x;
cin>>n;
for(i=1;i<=n;i++)
{
cin>>x;
cout<<d(x,2)<<endl;
}
return 0;
}
int d(int x,int y)
{
int j,num=1;
if(x==1)
return 0;
if(x==2)
return 1;
for(j=y;j<=(int)sqrt((double)x);j++)
if(x%j==0)
num+=d(x/j,j);
return num;
}

2

int num=1,k=0;
int count(int n)
{
for(int i=2;i<=sqrt(n);i++)
{
if(n%i==0&&i>=k)
{
num++;
k=i;
count(n/i);
k=0;
}
}
return (num);
}
int main()
{
int i,n,a[100];
cin>>n;
for(i=0;i<n;i++)
{
cin>>a[i];
}
for(i=0;i<n;i++)
{cout<<count(a[i])<<endl;num=1;k=0;}
return 0;
}
3

int s=0,p=1;
void fenjie(int a,int b)
{
int i;
if(a==1)
s++;
for(i=b;i<=a;i++)
if(a%i==0) fenjie(a/i,i);
return;
}
int main()
{
int n,i,j,a[100];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
for(j=2;j*j<=a[i];j++)
{
if(a[i]%j==0)
{
s=0;
fenjie(a[i]/j,j);
p=p+s;
}
}
printf("%d
",p);
p=1;
}
return 0;
}
3