int main()
{
int i=0,t=0,j=0,v,z,a[N],n=100,s=0;
while(n!=1)
{
if(n%2==0)
{
t=n/2;
a[i]=n;
n=t;
printf("a[%d]=%d\n",i,a[i]);
i++;
continue;
}
if(n%2!=0)
{
t=n*3+1;
a[i]=n;
n=t;
printf("a[%d]=%d\n",i,a[i]);
i++;
continue;
}
}
a[i]=1;
printf("a[%d]=%d\n",i,a[i]);
scanf("%d%d",&v,&z);
t=a[v-1];
for(int q=v-1;q<=z-1;q++)
{
if(t<a[q+1])
{
t=a[q+1];
}
}
printf("%d\t%d\t%d\n",v,z,t);
return 0;
}