Largest Element in an Array
easyQuestion 218To find the biggest value in an array, assume the first element is the largest so far, then compare it against every other element. Whenever you find something bigger, remember that new value. After checking the whole array you will have the maximum. Print 'Max: ' followed by the largest number.
Expected output
Max: 9= newline. No newline after the last line.
Hints4 available
Sign in to use hintsTopics
Arrays
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (p, fori)
Your output
Run your code to see the output here...
Test cases
Run your code to see test case results.