Sum Average Minimum and Max
Lesson 11 of 24 in Coddy's Golang Challenges - Level 1 course.
Challenge
EasyWe have an array like this: [3.5, 2.34, 8.9, 1.6, 4.3].
Write a function to calculate the sum, average, minimum, and maximum values of the given slice of floating-point numbers.
Print the values in this order: (sum, average, min, max).
Try it yourself
import "fmt"
func calculate() {
}All lessons in Golang Challenges - Level 1
1Introduction
Introduction3Play with Slices & Arrays
Longest StringDouble Even NumbersSum Average Minimum and MaxSumEven & Odd NumbersSlice to Map Non Repeated Indices