Practice Problem 0 - Array Total


Loyola College > Department of Computer Science > Dr. James Glenn > HS Programming Contest > Problems > Array Total

Problem

Write a static method in the Total class that takes an array of ints as an argument (C++: and an int for the size of the array as well) and returns the total of all of the values in the array. For example, if the array is [1 10 9] then the method should return 20.