learned I didn't need git for external modules and different folders can have different mains

This commit is contained in:
2024-02-03 11:00:34 -05:00
parent 943191e9dd
commit 19b1581f10
37 changed files with 439 additions and 16 deletions

View File

@ -0,0 +1,22 @@
package main
import (
"fmt"
"log"
"os"
"strconv"
)
func main() {
arguments := os.Args[1:]
var sum float64 = 0
for _, argument := range arguments {
number, err := strconv.ParseFloat(argument, 64)
if err != nil {
log.Fatal(err)
}
sum += number
}
sampleCount := float64(len(arguments))
fmt.Printf("Average: %0.2f\n", sum/sampleCount)
}