+ 8
Given 4 integer numbers, so that the sum of any 2 numbers is a full square
For instance: a+b=k^2 b+c =n^2 c+d= p^2 d+a =r^2 etc.
6 Respuestas
+ 4
Thx a lot
+ 1
Do you want to generate these numbers or they will be input from the user and your program will define if the summaries are perfect squares ?
0
It should generate this numbers
0
By the way the numbers are not equal
0
Use vectors to get distinct combinations of numbers.
and for every combination call AreAllCombinationsSumSquare (in my code above)
to define if it is the right combination.
For getting the combinations check the below code :
https://www.geeksforgeeks.org/make-combinations-size-k/
with k=4 and n=the maximum number