I'm suppose to write a code that tests if the dimensions a user has entered equals a cube..
I thought it worked but now I'm testing it and its only working if the user inputs 1 as the length, width and height.. Am i missing something ? It's a very simple code but it's not working.. :(
cout << "Is your object a cube? " << endl; //message displayed
cout << "Please enter the length: " << endl;
cin >> length; // user will input length
cout << "Great! Now enter width: " << endl;
cin >> width; // user will input desired width
cout << "OK, Now enter height: " << endl;
cin >> height; // user will input height
if (length == width == height)
cout << "Your object is a cube!! \n";
else
cout << "Your object is not a cube \n";