MAX & SUM of array

5

1 votes
Problem

Find the maximum element in an array.And also find the SUM of Array elements.

Input:-

1)Read the array size N.

2)Read the N array elements.

Output:-

1)print the greatest element in an array.

2)print the sum of all elements in an array.

Sample Input
5
1 2 3 4 5
Sample Output
MAX=5
SUM=15
Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?