Even & Odd Numbers
Lesson 13 of 24 in Coddy's Golang Challenges - Level 1 course.
Challenge
EasyWe have an array like this:
[20, 6, 78, 89, 9, 12, 33]
Write a function that takes an array of numbers and performs multiplication for the odd numbers and addition for the even numbers, returning the sum of them (sumOfEven + sumOfOdd ).
Try it yourself
func performOperations( ) {
}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