Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

One Line Factorial

Name: Anonymous 2009-06-15 15:56

for(int a1=1,a2=1,i=scanf_s("%d",&i)+i-1;(i--)>2; a1=(a2+=a1)-a1,(i==2)?printf_s("Result=%d\n",a2):NULL)

Name: Anonymous 2009-06-18 6:13


public final long factorial(final int n) {
 return (n == 1 ? 1 : n * factorial(n - 1));
}


AM I DOING IT RIGHT?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List