You are viewing a single comment's thread. Return to all comments →
A very poor code stub for scala
object Solution { def main(args: Array[String]) { val sc = new java.util.Scanner (System.in); var n = sc.nextInt(); int a0 = 0; while(a0 < n){ var x = sc.nextDouble(); a0+=1; } } }
first: this challenge bans var and val.
second: ignoring the first there are 2 places where it should have used val instead of var.
third: semicolons;
forth: int a0 = 0 isn't even valid scala syntax
int a0 = 0
Seems like cookies are disabled on this browser, please enable them to open this website
Evaluating e^x
You are viewing a single comment's thread. Return to all comments →
A very poor code stub for scala
first: this challenge bans var and val.
second: ignoring the first there are 2 places where it should have used val instead of var.
third: semicolons;
forth:
int a0 = 0
isn't even valid scala syntax