You are given an array of integers "array []" and an input "x". you have to find if there are any two numbers in your array such that the sum of their square equals to x2. in other words, you have to find out if there is any pair of i, j such that array[i]2 + array[j]2 = x 2. if there are such pairs, you should print all such (i, j). otherwise print "there are no such pairs". example: array []: 6, - 4, 6, 3, 9, 0, - 1, - 9, 2, 6 x: 5 you have 1 pair: (-4) 2 + (3) 2 = 5 2 so, your output would be corresponding array indices: (1, 3) note: the array size is 10 and you have to get the elements of the array from
+1
Answers (1)
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “You are given an array of integers "array []" and an input "x". you have to find if there are any two numbers in your array such that the ...” in 📘 Mathematics if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Home » Mathematics » You are given an array of integers "array []" and an input "x". you have to find if there are any two numbers in your array such that the sum of their square equals to x2.