Write a function that accepts an array of integer values and the number of values in this array

computer science

Description

Write a function that accepts an array of integer values and the number of values in this array. It should return true if any of the values in the array is the square of one of the other values, and false otherwise example1: the array contains { 4, 5, 9, -3, 25, 17 } the function should return true (25 = 5 squared, 9 = -3 squared) example2: the array contains { 4, 5, 12, -3, 24, 17, 1 } the function should return false (none of the values are the square of one of the other values) Note the "other values". Having a "1" somewhere in the array does NOT guarantee a true result. Your function must be consistent with the sample call below: int values[20]; ..... if (checkForSquares (values, 20)) { .... // one of the values is the square of one of the other values }


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.