Skip to content

Commit

Permalink
Condicionales con String (Curso de Kotlin desde cero [27])
Browse files Browse the repository at this point in the history
  • Loading branch information
programadornovato committed Oct 30, 2020
1 parent 31fa3d8 commit 6444e01
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions scratch_10.kts
@@ -0,0 +1,22 @@
/*
println("Por favor humano ingresa un texto del menu\nacceso\nconfiguracion\nayuda")
var seleccion= readLine()
seleccion=seleccion!!.toLowerCase()
when(seleccion){
"acceso"-> println("Haz seleccionado acceso")
"configuracion"-> println("Haz seleccionado configuracion")
"ayuda"-> println("Haz seleccionado ayuda")
else-> println("humano tonto esa opcion no existe")
}
*/
println("Humano saludame con un hola:")
var respuesta= readLine()!!.toLowerCase()
if(respuesta=="hola"){
println("Hola humano como estas")
}else{
println("No te entendi")
}




0 comments on commit 6444e01

Please sign in to comment.