fmt.Scanf Introduction
From the fmt package; the Scanf function is used to read input from stdin. When you run this snippet of code the main() function will wait for user input a string, a number, and a second string. Which it puts into variables, and then uses to print some information.
Scanf woul be used when you want to write a command line program that requires user input during the running process.
|
|