cout << "The sum is " <<sum<<endl<<"The sumCheck is "<<sumCheck<<endl;
if (sum==sumCheck)
{
cout<<"Is a polygon"<<endl;
}
else
{
cout<<"Is not a polygon"<<endl;
}
The sum is correctly displayed as 360 and sumCheck is correctly displayed as 360 yet the message "Is not a polygon" is displayed.
I can't figure out why the "Is not a polygon" message is always displayed.
Thanks in advance for any help!