Menu
Coddy logo textTech

Sum Average Minimum and Max

Lesson 11 of 24 in Coddy's Golang Challenges - Level 1 course.

challenge icon

Challenge

Easy

We 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