News for hackers. Stuff that matters.
Re:Ask HN: What is the most beautiful piece of code you've e... by emmelaich on Monday October 28, 2019 @04:43AM (#21375235)
That Rust is very nice.

But a more idiomatic C version would be

   long factorial(int n)
   {
     long result = 1;
     for (int c = 1; c <= n; c++)
       result *= c;
     return result;
   }

There are no comments on this comment yet.