int fac(int n)
{
    return n<=1? 1:n*fac(n-1);
}

아님 return n>1? n*fac(n-1):1;

+ Recent posts