Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created March 6, 2018 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/36a85fe7c7972aa2c14ca301161e639d to your computer and use it in GitHub Desktop.
Save parzibyte/36a85fe7c7972aa2c14ca301161e639d to your computer and use it in GitHub Desktop.
package main
import "fmt"
func main() {
var limite int
fmt.Print("¿Hasta cuál tabla deseas ver? ")
fmt.Scanln(&limite)
for tabla := 1; tabla <= limite; tabla++ {
//Imprimir un separador
fmt.Printf("\n--Tabla del %d--\n", tabla)
for numero := 1; numero <= 10; numero++ {
resultado := numero * tabla
fmt.Printf("%d x %d = %d\n", tabla, numero, resultado)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment