Sum of Array Problem
Sum of Array Problem — ExecCode School DSA Practice
Solve the Sum of Array problem on ExecCode. Free online school DSA practice in Arrays - Basics. Write and run code in Java, C++, Python — no signup required to run.
Problem description
You are given a list of whole numbers. Your task is to solve Sum of Array. Add all of them together and print the total.
Examples
Input 5 1 2 3 4 5; Output 15. Input 3 -1 0 1; Output 0
Constraints
1 <= N <= 10^4, -10^3 <= arr[i] <= 10^3
Practice Sum of Array free on ExecCode. Browse DSA problems, topic map, and placement guides.