fork download
  1. object Main extends App {
  2.  
  3. val grandfather = “Andy”
  4.  
  5. val grandmother = “Florida”
  6.  
  7. val uncle = “Harke”
  8.  
  9. val aunt = “Bobo”
  10.  
  11. val brother = “Steven”
  12. val sister = “Caroline”
  13.  
  14. val father = “Ferguson”
  15. val mother = “Balotelli”
  16.  
  17. println(“Please select a number from the list:)
  18.  
  19. println("1. Who is Jack's grandfather?")
  20. println("2. Who is Jack's grandmother?")
  21. println("3. Who is Jack's father?")
  22. println("4. Who is Jack's mother?")
  23. println("5. Who is Jack's sister?")
  24. println("6. Who is Jack's brother?")
  25. println("7. Who is Jack's Uncle?")
  26. println("8. Who is Jack's Aunt?")
  27.  
  28. val input = readLine()
  29.  
  30. if (input == "1")
  31. {
  32. println (grandfather)
  33. }
  34. else if (input == "2")
  35. {
  36. println(grandmother)
  37. }
  38. else if(input == "3")
  39. println(father)
  40. else if (input == "4")
  41. println(mother )
  42. else if (input == "5")
  43. {
  44. println(sister)
  45. }
  46. else if(input == "6")
  47. println(brother )
  48. else if (input == "7")
  49. {
  50. println(uncle)
  51. }
  52. else if(input == "8")
  53. {
  54. println(aunt)
  55.  
  56. }
  57.  
  58.  
  59.  
  60. }
  61.  
  62.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1
compilation info
/opt/scala/bin/scalac: line 50: /dev/null: Permission denied
Main.scala:3: error: illegal character '\u201c'
	val grandfather = ?Andy?	
                          ^
Main.scala:3: error: illegal character '\u201d'
	val grandfather = ?Andy?	
                               ^
Main.scala:5: error: illegal character '\u201c'
	val grandmother = ?Florida?
                          ^
Main.scala:5: error: illegal character '\u201d'
	val grandmother = ?Florida?
                                  ^
Main.scala:7: error: illegal character '\u201c'
	val uncle = ?Harke?
                    ^
Main.scala:7: error: illegal character '\u201d'
	val uncle = ?Harke?
                          ^
Main.scala:9: error: illegal character '\u201c'
	val aunt = ?Bobo?
                   ^
Main.scala:9: error: illegal character '\u201d'
	val aunt = ?Bobo?
                        ^
Main.scala:11: error: illegal character '\u201c'
	val brother = ?Steven?
                      ^
Main.scala:11: error: illegal character '\u201d'
	val brother = ?Steven?
                             ^
Main.scala:12: error: illegal character '\u201c'
	val sister = ?Caroline?
                     ^
Main.scala:12: error: illegal character '\u201d'
	val sister = ?Caroline?
                              ^
Main.scala:14: error: illegal character '\u201c'
	val father = ?Ferguson?
                     ^
Main.scala:14: error: illegal character '\u201d'
	val father = ?Ferguson?
                              ^
Main.scala:15: error: illegal character '\u201c'
	val mother = ?Balotelli?
                     ^
Main.scala:15: error: illegal character '\u201d'
	val mother = ?Balotelli?
                               ^
Main.scala:17: error: illegal character '\u201c'
	 println(?Please select a number from the list:?) 
                 ^
Main.scala:17: error: illegal character '\u201d'
	 println(?Please select a number from the list:?) 
                                                       ^
18 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