golang-exercises/golangr/array/main.go

22 lines
322 B
Go
Raw Normal View History

2024-01-26 18:53:59 +01:00
package main
import (
"fmt"
)
func main() {
var notafinal int = 0
numbers := []int{9, 9, 10}
for i := 0; i < len(numbers); i++ {
notafinal = notafinal + numbers[i]
}
fmt.Println("La notas combinadas suman", notafinal)
// numbers = append(numbers, 1)
// fmt.Println(len(numbers))
// fmt.Println(numbers)
}