โ Back to Arrays
Question 421
Find Range (Max minus Min)
Find Range (Max minus Min)
An arrayint nums[] = {7, 2, 9, 4, 11, 5}is given. The range is the largest element minus the smallest element. Compute it and print the result: 9 (here11 - 2 = 9). Print only the number and a newline.
Expected Output:
9
Topics:
Arrays
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cout, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.