Advertisement
acarrunto

2 - conditionals (if - else )

May 14th, 2022
1,087
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.39 KB | None | 0 0
  1. fun main() {
  2.     var calorias: Int = 100
  3.     if (calorias>100){
  4.        println("you eat to much")
  5.     } else if (calorias == 100){
  6.         println("you can each junk") // you can make a chain of "else if" it always have to end with "else"
  7.     } else {
  8.         println("you are dead")
  9.     }
  10.    
  11.    
  12.     // next, "understanding the truth table" that the one I need to watch next.
  13.    
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement