Explore
ProGrad Programs
About Us

Edit
Reply




Edit

Program to find the sum of elements in a given array | FACE Prep

Published on 11 Mar 2020

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


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


C
C++
Java
Python 3

Output
Enter the size of array : 5
Enter the element of array : 10 20 30 40 50
The Sum is 150


Recommended Programs







If you have any feedback about this article and want to improve this, please write to enquiry@faceprep.in
Explore 'c plus plus'
Articles Practice Exercises