Add intermedio.go file and update README

This commit is contained in:
2026-02-14 18:04:52 +01:00
parent e0291e1c59
commit 24102d50a7
3 changed files with 50 additions and 0 deletions

46
intermedio.go Normal file
View File

@@ -0,0 +1,46 @@
package main
import "fmt"
func main() {
fmt.Println("Hola mundo")
for i := 0; i < 5; i++ {
if i == 3 {
fmt.Println("Hasta el 3")
break
}
fmt.Println(i)
}
x := 2
switch x {
case 1:
fmt.Println("1")
case 2:
fmt.Println("2")
break
case 3:
fmt.Println("3")
default:
fmt.Println("default")
}
for i := 0; i < 5; i++ {
if i%2 == 0 {
fmt.Println(i, " es par")
continue
}
fmt.Println(i)
}
for i := 1; i <= 3; i++ {
for j := 1; j <= 3; j++ {
if j == 2 {
continue
}
fmt.Println("i=", i, "j=", j)
}
}
}