Because you don't have brackets around your if statements, the else pairs with the last if it sees. E.g. the red text is an if-else pair.
Code:
if (A < B)
if (B < C)
if (C < D)
if (D < E)
cout << "Ascending Order" << endl;
if (A > B)
if (B > C)
if (C > D)
if (D > E)
cout << "Descending Order" << endl;
else
{
cout << "Not in any order at all" << endl;
}
Even adding brackets won't fix it truly, though. You want only three possible code paths; it's either ascending, descending, or neither. This means you should have an if/else if/else setup, and you don't want to nest the if statements.
Code:
if (A < B && B < C && C < D && D < E)
cout << "Ascending Order" << endl;
else if (A > B && B > C && C > D && D > E)
cout << "Descending Order" << endl;
else
cout << "Not in any order at all" << endl;