123456789101112131415161718192021222324252627282930313233 |
- package main
- import (
- "fmt"
- )
- func main() {
- i := 0
- for i < 10 {
- fmt.Println("Incrementando i", i)
- i++
- //time.Sleep(time.Second)
- }
- fmt.Println(i)
- for j := 0; j < 10; j++ {
- fmt.Println("Incrementando j", j)
- //time.Sleep(time.Second)
- }
- nomes := [3]string{"João", "Fernando", "Alice"}
- for indice, nome := range nomes {
- fmt.Println(indice, nome)
- }
- for _, nome := range nomes {
- fmt.Println(nome)
- }
- }
|