go: how to input two-dimensional string array form keyboard??

59 views
Skip to first unread message

shine sun

unread,
Jun 10, 2019, 1:19:02 AM6/10/19
to golang-nuts
Firstly,  I try to input N and M from keyboard, creating a two-dimensional string array (var nums [N][M]string). Then, for i := 0; i < N; i++ , how to use fmt.Scanf to input M strings for each nums[i]? Finally, it can successfully  output the two-dimensional array nums. Thank you for helping!

Ivan Fraixedes

unread,
Jun 11, 2019, 8:52:00 AM6/11/19
to golang-nuts
Could you post your non-working peice of code? it should help to understand what's the problem.
Reply all
Reply to author
Forward
0 new messages