This commit is contained in:
Mark McGranaghan
2012-09-23 14:31:05 -07:00
parent d1e82077ac
commit 64aa4acf05
69 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
// ## Reading Input
package main
import "fmt"
func main() {
fmt.Print("Enter a number: ")
var input float64
fmt.Scanf("%f", &input)
output := input * 2
fmt.Println(input, "* 2 =", output)
}

View File

@@ -0,0 +1,3 @@
$ go run reading-input.go
Enter a number: 7
7 * 2 = 14