Created
December 29, 2016 07:54
-
-
Save cipepser/916d6c7abb3721d8c4df8e285afc51b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"strconv" | |
) | |
func Template(x int, y string, z float64) string { | |
var s = strconv.Itoa(x) + "時の" + y + "は" + strconv.FormatFloat(z, 'f', -1, 64) | |
return s | |
} | |
func main() { | |
var x int = 12 | |
var y string = "気温" | |
var z float64 = 22.4 | |
fmt.Println(Template(x, y, z)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment