What am I doing wrong here? I commented some stuff out to test set values. The values entered are a right triangle but for some reason my if statements might be mixed up some and it's saying it's not a right triangle. It's probably something simple, but I must be overlooking it.

Code:

#include <iostream>
#include <cmath>
using namespace std;
int main()
{
// double x, y, z;
double hypot, side1, side2;
double x = 1;
double y = 1;
double z = sqrt(2.0);
//cout<<"Enter a value for the first side:"<<endl;
//cin>>x;
//cout<<"Enter a value for the second side:"<<endl;
//cin>>y;
//cout<<"Enter a value for the third side:"<<endl;
//cin>>z;
if(x < 0.0 || y < 0.0 || z < 0.0)
cout<<"ERROR: The sides of the triangle must be greater than 0.0";
else
if(x > y && y > z)
{
hypot = x;
side1 = y;
side2 = z;
}
else if(y > x && y > z)
{
hypot = y;
side1 = x;
side2 = z;
}
else
{
hypot = z;
side1 = x;
side2 = y;
}
if(pow(hypot,2) == pow(side1,2) + pow(side2,2))
cout<<"This IS a right triangle."<<endl;
else
cout<<"This IS NOT a right triangle."<<endl;
cout<<pow(hypot,2)<<endl;
cout<<pow(side1,2) + pow(side2,2)<<endl;
return 0;
}