Write a program to calculate the sum of elements in an array.
MediumProblem Statement
Write a program to calculate the sum of elements in an array.
Sample Input
int arr[] = {1, 2, 3, 4, 5};Sample Output
Sum of elements: 15
Limits
Time: 2s · Memory: 256 MB