Question: ///Given a non-negative integer c, decide whether there're two integers a and b such that a^2 + b^2 = c. ///For example: ///Input: C =
///Given a non-negative integer c, decide whether there're two integers a and b such that a^2 + b^2 = c. ///For example: ///Input: C = 5 will return the output: true (1*1 + 2*2 = 5) ///Input: A = 3 will return the output : false ///Input: A = 4 will return the output: true ///Input: A = 1 will return the output : true ///Note: You cannot use inbuilt Math Class functions. /// /// /// True or False private static bool squareSums(int n3) { try { // write your code here\ return false; } catch (Exception) { throw; } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
