Files
master_go_programming/Section9/76-2.go
2023-11-08 13:19:00 +01:00

22 lines
319 B
Go

/*
Coding Exercise #2
Consider the following array declaration:
nums := [...]int{30, -1, -6, 90, -6}
Write a Go program that counts the number of positive even numbers
in the array.
*/
package main
func main() {
nums := [...]int{30, -1, -6, 90, -6}
for i := 0; i < len(nums); i++ {
if i > 0 && i%2 {
}
}
}