Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
In response to the question and to the Dwaiku (Double-Haiku or whatever you wanna call it) posted by Quincunx in Java, here's the correct Haiku in Java:
public static int factorial(int n) {
return (n==0) ? (n+1) : (factorial(n-1) * n);
}
In response to the question and to the Dwaiku (Double-Haiku or whatever you wanna call it), here's the correct Haiku in Java:
public static int factorial(int n) {
return (n==0) ? (n+1) : (factorial(n-1) * n);
}
JAVA:
In response to the question and to the Dwaiku (Double-Haiku or whatever you wanna call it) posted by Quincunx in Java, here's the correct Haiku:
public static int factorial(int n) {
return (n==0) ? (n+1) : (factorial(n-1) * n);
}