Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Condicionales con String (Curso de Kotlin desde cero [27])
Video: https://youtu.be/zj_gHylSg48
- Loading branch information
1 parent
31fa3d8
commit 6444e01
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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") | ||
} | ||
|
||
|
||
|
||
|