Created
July 13, 2022 12:05
-
-
Save usmanovrustam/1162a46904c9f12af56be4ea6397792b to your computer and use it in GitHub Desktop.
Given a List of integers, return the sum of its elements.
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
| int sumOf(List<int> integers) { | |
| int result = 0; | |
| for (var i = 0; i < integers.length; i++) { | |
| result += integers[i]; | |
| } | |
| return result; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment