algebraic equation help

basically this is my assignment:


Write a program to verify if the following expression is true.
x^2 - y^2 = (x + y) * (x - y)
The program will do the following:
1. ask the user to enter the value of x and y;
2. calculate the left member of the expression
3. calculate the right member of the expression
4. check if the two values are equal

i don't even know where to start, so any help would be greatly appreciated.
1
2
3
float x, y;
cin >> x >> y;
cout << "This expression is " << (x*x - y*y == (x+y) * (x-y)) ? "true" : "false";


Three lines of code. Not too bad ;) Now stick it in a main.
Topic archived. No new replies allowed.