Skip to content
Placement Preparation
FACE Prep Campus
For Colleges
For Companies
Placement Preparation
Face Prep Campus
For Colleges
For Companies
Program to find the sum of elements in a given array | faceprep
The program to find the sum of elements in a given array is discussed here.
Given the number of elements of the array and the array elements, the sum of the elements of the array is produced as output.
Input Format:
Input the number of elements of the array
Input the Array elements
Input :
3
1
2
3
Output :
6
Click here
to learn more about FACE Prep PRO
Algorithm to find the sum of elements in a given array
Input the number of elements of the array.
Input the array elements.
Sum = addition of all the array elements.
Display sum.
Program to find the sum of elements in a given array
@@coding::1@@
Recommended Programs
Basic array operations (Insert, delete and search an element)
Smallest and largest element in an array
Check if two arrays are the same or not
Finding the array type
Sum of positive square elements in an array
Second smallest element in an array
Toggle Light/Dark Mode