This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main(){ | |
for(x in 1..5){ | |
println(x) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() { | |
val point = 91 | |
when (point) { | |
in 0..55 -> { | |
println("low") | |
} | |
in 55..75 -> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() { | |
val a = 51 | |
val b = 25 | |
if (a < b) { //Bu koşul false dönecektir çünkü a sayısı b sayısından küçük değildir bu yüzden else bloğu çalışır. | |
println("a sayısı b sayısından küçüktür.") | |
} else { | |
println("a sayısı b sayısından küçük değildir.") | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() { | |
val a = 13 | |
val b = 25 | |
if (a < b) { //Bu koşul true dönecektir çünkü a sayısı b sayısından küçüktür. | |
println("a sayısı b sayısından küçüktür.") | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val isTrue : Boolean = true | |
val isFalse : Boolean = false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var firstChar = ‘A’ | |
var courseName = “Sinyaller ve Sistemler” |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val floatNum = 3.14f | |
val doubleNum = 2.37487 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val byteNum : Byte = 97 | |
val byteNum2 : Byte = 128 // aralık dışına çıktığımız için hata alırız | |
val shortNum : Short = 236 | |
val intNum : Int = 43 | |
val intNum2 = 105 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val name : String | |
name = "mert" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var name = "mert" | |
val number = 5 |
NewerOlder