CJCoding With Joseph

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:

9

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

Expected Output:

9
Topics:
Arrays
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท 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.