Python Program to find sum of array
Given an array of integers, find sum of its elements.
Examples :
Input : arr[] = {1, 2, 3}
Output : 6
1 + 2 + 3 = 6
Input : arr[] = {15, 12, 13, 10}
Output : 50
Method 1:
Output:
Sum of the array is 34
Method 2:
Output:
Sum of the array is 34
No comments:
Post a Comment
Your feedback is highly appreciated and will help us to improve our content.