Last active
May 8, 2018 01:05
-
-
Save onadmeister/94894afb4b1d1eb9880eb8b51dbfbb16 to your computer and use it in GitHub Desktop.
package main untuk create package tutorial
This file contains hidden or 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" | |
| "latihan-package/math" | |
| ) | |
| func main() { | |
| b := []float64{1,2,3,4} | |
| sum := math.Sum(b) | |
| avg := math.Average(b) | |
| fmt.Println("Jumlah Bilangan Adalah ", sum) | |
| fmt.Println("Rata - Ratanya adalah ", avg) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment