CJCoding With Joseph
15free / daySign inCreate account

Range of Array

The array {7, 2, 9, 4, 11, 5} is given. The range is the largest element minus the smallest element. Print the range (see Expected Output).

Here the maximum is 11 and the minimum is 2, so the range is 11 - 2 = 9.

Expected Output:

9

= newline. No newline after the last line.

Hints4 available
Topics:
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.