Sum of Array
Submissions: 8641   Accuracy:

51.38%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!

Given an integer array A[] of size N. The task is to find sum of it.

Input:
The first line of input contains an integer, the number of testcases T. Each testcase should contain an integer, size of array N in the first line. In the second line contains elements of the array in a single line separated by space.

Output:
Print the sum in seperate line.

Constraints:
1 <= T <= 30
1 <= N <= 100
1 <= Arr[i] <= 100

Example:
Input:
1
4
1 2 3 4

Output:
10

** For More Input/Output Examples Use 'Expected Output' option **

Author: abhiraj26


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.