github.com/giovannyortegon/go@v0.0.0-20220115155912-8890063f5bdd/Profesional/ControlFlujo/bucles.go (about) 1 package main 2 3 import "fmt" 4 5 func main() { 6 // BUCLE INFINITO 7 /* for { 8 fmt.Println("Bucle Infinito") 9 }*/ 10 11 // while 12 numeros := 12345 13 c := 0 14 15 for numeros > 0 { 16 numeros /= 10 17 c++ 18 } 19 20 fmt.Println("Cantidad de digitos", c) 21 22 for i := 0; i < 10; i++ { 23 fmt.Println("Bucle for como en C") 24 } 25 }