Skip to content

Instantly share code, notes, and snippets.

@hectorgool
Created August 19, 2017 13:55
Show Gist options
  • Select an option

  • Save hectorgool/b5d18517fa3284bf21b83e01db8fcc6d to your computer and use it in GitHub Desktop.

Select an option

Save hectorgool/b5d18517fa3284bf21b83e01db8fcc6d to your computer and use it in GitHub Desktop.
/*
twitter@hector_gool
*/
package main
import "fmt"
func main() {
fmt.Println("\nIngresa un número del 1 al 7, para decirte a que dia corresponde\n")
var dia int
fmt.Scan(&dia)
if dia == 1 {
fmt.Println("Lunes")
} else if dia == 2 {
fmt.Println("Mártes")
} else if dia == 3 {
fmt.Println("Miércoles")
} else if dia == 4 {
fmt.Println("Jueves")
} else if dia == 5 {
fmt.Println("Viernes")
} else if dia == 6 {
fmt.Println("Sábado")
} else if dia == 7 {
fmt.Println("Domingo")
} else {
fmt.Println("El dato ingresado no es válido")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment