Part 1 The range of a set of values is the difference between the highest value and the lowest value in the set. Write a C/C++ program that prompts the user to enter N integer values and stores it in an array. Calculate and display the range of the values, as well as the largest and smallest values in the set you can declare an array of size N by declaring the array after the user enters a value for N! "HLCMPG121 2018PraktieselPractical 6Memo\Deel Tbin\Debug Deel 1.ee How many elements should be stored in the array? Enter value for element at Enter value for elenent ndex 0: at index 11 66 77 Enter value for element at index 2: Enter value for element at index 3: Enter value for element at index 4: Enter value for element at index 5: Enter value for element at index 6: Enter value for element at index 7: Enter value for element at index 8: Enter value for element at index 9: Max: Min: Range: 44 55 22 33 99 11 25 99 11 88 returned e (exe) execution time: 34.461 s Press any key to

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 2RQ
icon
Related questions
Question

C++

Part 1
The range of a set of values is the difference between the highest value and the lowest value in the set. Write a C/C++ program that prompts the user to enter N integer values and stores it in an array. Calculate and display the range of the values, as well as the largest and smallest
values in the set.
TIP: you can declare an array of size N by declaring the array after the user enters a value for N!
"HLCMPG121 2018\Praktiese Practical 6\Memo\Deel Tibin\Debug\Deel 1.exe"
How many elements should be stored in the array?
Enter value for element at index e:
Enter value for element at index 1:
Enter value for element at index 2:
Enter value for element at index 3:
Enter value
Enter value for element at index 5:
Enter value for element at index 6
Enter value for element at index 7:
Enter value for element at index 8:
Enter value for element at index 9:
Max:
Min:
Range:
88
66
77
44
55
för element at index 4:
22
33
99
11
25
99
11
88
Process returned e (exe)
Press any key to continue.
execution time: 34.461s
Transcribed Image Text:Part 1 The range of a set of values is the difference between the highest value and the lowest value in the set. Write a C/C++ program that prompts the user to enter N integer values and stores it in an array. Calculate and display the range of the values, as well as the largest and smallest values in the set. TIP: you can declare an array of size N by declaring the array after the user enters a value for N! "HLCMPG121 2018\Praktiese Practical 6\Memo\Deel Tibin\Debug\Deel 1.exe" How many elements should be stored in the array? Enter value for element at index e: Enter value for element at index 1: Enter value for element at index 2: Enter value for element at index 3: Enter value Enter value for element at index 5: Enter value for element at index 6 Enter value for element at index 7: Enter value for element at index 8: Enter value for element at index 9: Max: Min: Range: 88 66 77 44 55 för element at index 4: 22 33 99 11 25 99 11 88 Process returned e (exe) Press any key to continue. execution time: 34.461s
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr