Playing with arrays
This commit is contained in:
parent
dd1849da8e
commit
bb1cf72840
|
@ -0,0 +1,3 @@
|
|||
module array
|
||||
|
||||
go 1.21.6
|
|
@ -0,0 +1,21 @@
|
|||
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)
|
||||
}
|
Loading…
Reference in New Issue