I want to read a list of numbers given by the user into an array and perform operations on them.
package main
import "fmt"
func main() {
var n,c,i int
var a []int
fmt.Println("Enter the number of inputs")
fmt.Scanln(&n)
fmt.Println("Enter the inputs")
for i=0 ; i<n-1; i++ {
fmt.Scanln(&c)
}
fmt.Println(a[i])
}
Can someone help me out.