Skip to content

Instantly share code, notes, and snippets.

@fluency03
Last active July 12, 2016 20:09
Show Gist options
  • Save fluency03/bebb6b5fee1a9aeb1d6f204a5ee68574 to your computer and use it in GitHub Desktop.
Save fluency03/bebb6b5fee1a9aeb1d6f204a5ee68574 to your computer and use it in GitHub Desktop.
/**
* This is a Scala script: scala-while.scala
*/
var num1: Int = 0
while (num1 < 10) {
println("num1 = " + num1);
num1 += 1;
}
var num2: Int = 0
do {
println("num2 = " + num2);
num2 += 1;
} while (num2 < 10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment