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
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.
preparecodinginterview_dot_com | 190 |
__murugan__ | 173 |
manvimahajan20 | 140 |
xiaoyan_yunche | 139 |
ShameekAgarwal | 116 |
preparecodinginterview_dot_com | 190 |
__murugan__ | 173 |
manvimahajan20 | 166 |
SoumyaKaushik | 146 |
arpit_anshuman | 140 |
blackshadows | 5331 |
Ibrahim Nash | 5219 |
akhayrutdinov | 5111 |
mb1973 | 4929 |
Quandray | 4567 |