You are using a version without Ads of this website. Please, consider donating:

### Equation problem?

I'm trying to write a program that will ask you witch answer do you want to be written (outputed), x or y? Sadly I don't have enough skill to solve this, can anyone help me with this?

this is the equation: x^2 + 4 = y^3

So the answer for x should be 2, and the answer for y should also be 2. At least I think.

Here is my badly written program(Please don't laugh):
 1234567891011121314151617181920212223242526272829 #include #include using namespace std; int main () { int a = pow(1, 2); int b = pow(1, 3); int c = 4; int equation = a + c; equation = a; if (a + c != b) { a++; b++; cout << "Which solution do you want?"; cout << a << endl; cout << b << endl; }else { return 0; } } return 0; }

MediumSolid wrote:
answer for x should be 2, and the answer for y should also be 2
Isn't answer for x is ±√(y³ − 4) and for y is ³√(x² + 4)?
That would be the more precise answer, but i don't think that would be it. It would be too easy than.
Topic archived. No new replies allowed.