Hello Guys I am naiive user in Go language. I am having a problem when i trying to read values into the array using for loop Code package main import fmt func main() { var x [5]string fmt.Println(Enter your friends name in the list) for i:= 0; i < len(x); i++ { fmt.Println(i) fmt.Scanf(%s,&x[i]) } } the Error i am getting is its reading first value then its taking next element as 1,2 Could anyone please help me out with what wrong am i doing.
Posted on: Mon, 01 Dec 2014 05:21:11 +0000