Question: please can you use C++ answer the question without explanation just I need the code. Write a program that reads 11 integer numbers where the
please can you use C++ answer the question without explanation just I need the code.
Write a program that reads 11 integer numbers where the first number is a special number (k), and the next 10 numbers will be placed in an integer array (numbers). Then, the program will find the pairs whose difference in either direction is equal to k in the given array and print them in the format given in the examples. If no such pairs exist, the program will NOT print out anything. NOTE: You MUST use a nested loop in this question. NOTE: You MUST keep the "numbers" inside an integer array. Input 9 6 5 7 13 20 -10 -8 -6 -46 7 6 3 2 3 1 156 3 5 1 67 -410 20 18 8 14 25 3 4 10 8 15 -2246-8-10 1-39 6 7 34 1 91 16 9 12 30 (-10,-10) (6,15) (1,10) (-8,-8) Output (7,1) (7,1) (7,1) (3,-3) (3,9) (3,-3) (3,9) (20,30) (18,8)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
