Write a function that accepts an array of integer values and the number of values in this array
Reaction Report
January 23, 2019
Security in Cloud
January 23, 2019

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

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 }

 

Looking for a Similar Assignment? Order now and Get 20% Discount!
Use Code; GET20

WhatsApp Chat with us on Whatsapp