- Find the maximum element of the array max(a, n) X total = 0 for i=1 to n total = total + a[i] return total

icon
Related questions
Question
- Find the maximum element of the array
max(a, n)
{
}
total = 0
for i=1 to n
total = total + a[i]
return total
Transcribed Image Text:- Find the maximum element of the array max(a, n) { } total = 0 for i=1 to n total = total + a[i] return total
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer