fork(1) download
  1. import scala.collection.JavaConversions._
  2.  
  3. object Addition {
  4.  
  5. def main(args: Array[String]): Unit = {
  6. var a: Int = 0
  7. var b: Int = 0
  8. var sum: Int = 0
  9. val in: Scanner = new Scanner(System.in)
  10. a = in.nextInt()
  11. b = in.nextInt()
  12. sum = a + b
  13. println(sum)
  14. }
  15.  
  16. }
  17.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
cat: /release: No such file or directory
Main.scala:9: error: not found: type Scanner
    val in: Scanner = new Scanner(System.in)
            ^
Main.scala:9: error: not found: type Scanner
    val in: Scanner = new Scanner(System.in)
                          ^
two errors found
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