I am trying to solve a diophantine equation using a simple for loop to solve this equation:
f(x,y) = x^2 + y^3 == 31
So i have defined:
X = collect(1:1:10)
e Y= collect(1:1:10)
and tried:
for i in Y
for j in X
println(i, j, f(i,j))
end
end
There a True return(2,3) and I want to get the X and Y of this True return and not all the false results…but I am not able to do it so far…any tips?
How can i code this?