Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Scala'da Döngü İfadeleri Yazımdaki Örnek 2
// Java
for (int i = 1; i <= 10; i++) {
System.out.println(i + "!");
}
System.out.println("Önüm, arkam, sağım, solum, sobe!");
// Scala
for (i <- 1 to 5) println(i + "!")
for (j <- 6 until 11) {
println(j + "!")
}
println("Önüm, arkam, sağım, solum, sobe!")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment