1. Write a function to add up and return the sum of all the numbers in an array
ID: 3534667 • Letter: 1
Question
1. Write a function to add up and return the sum of all the numbers in an array of int up to but not including the first 0 value. (Assume there is a 0 value in the array.)
2. Write a function that takes an array of integers and passes back the highest and lowest value in the array.
3. Write a function that takes an array of doubles and passes back the sum and the average of the numbers in the array.
4. Write a function that takes an integer number and passes back the sum of the integers up to that number. For example, passing in 5 would pass back 1 + 2 + 3 + 4 + 5 = 15
Explanation / Answer
//here you go, please rate http://ideone.com/R5qc3v
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.