this is my program but i am unable to fix the bug. Can anybody help me figure this out.
#include<stdio.h>
int fun(int x);
int main()
{
int test,n,y;
scanf("%d",&test);
while(test--)
{
scanf("%d",&n);
y=fun(n);
printf("%d\n",y);
}
return 0;
}
int fun(int x)
{
int a,b,c,d;
a=x/4;
b=x/3;
c=x/2;
d=a+b+c;
if(x>=d)
return x;
else
{
a=fun(a);
b=fun(b);
c=fun(c);
}
return (a+b+c);
}