Question: Q2: Write a program that: 1. Prompts the user to enter an integer representing the size of an array of integers 2. Fills the array

Q2: Write a program that: 1. Prompts the user to enter an integer representing the size of an array of integers 2. Fills the array with integers from the user 3. Creates an array of integers to hold the differences between two consecutive elements, fills it accordingly and displays it Example: In the below sample run, the array is of size 7 and is filled using values entered by the user with the below integers. The array of differences contains -10 which is (22 - 32), 2 which is (32-30), -18 which is (30-48) and so forth. Sample Run: Enter the size of the array: 7 Enter 7 integers: 22 32 30 48 Differences: -10 2 -18 -6 28 26 21 54 5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
