fork download
  1. object Test {
  2. def main(args: Array[String]) {
  3. for (i <- 1 to 10)
  4. println( "Factorial of " + i + ": = " + factorial(i) )
  5. }
  6.  
  7. def factorial(n: BigInt): BigInt = {
  8. if (n <= 1)
  9. 1
  10. n * factorial(n - 1)
  11. }
  12. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
spoj: The program compiled successfully, but Main.class was not found.
      Class Main should contain method: def main(args: Array[String]).
stdout
Standard output is empty