Question: C++ Write a program that outputs the difference (absolute value) between any successive (adjacent) pair of numbers in an integer list. Such a list might

 C++ Write a program that outputs the difference (absolute value) between

C++ Write a program that outputs the difference (absolute value) between any successive (adjacent) pair of numbers in an integer list. Such a list might represent daily stock market prices or daily temperatures, so the difference is the biggest singleday change. Part I: First let the user input an integer that represents the list size. Once that is done allow the user to enter all the elements of the list without a prompt since the input has to be done inside a loop. Use the format below: (80 Points) Enter the list size: [..Q Example: If the input is: 6 then the user will have to input 6 integers such as: 60 63 53 58 62 68. For this example the output would be: Biggest difference: 10 Part II: Update the code to also output which pair of numbers in the list produce the biggest difference. Using the example from part I the output would be number 2 and number 3. Use the format below: (20 Points) Biggest pair: 2 3

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!