// enum comparison

#include <iostream>
using namespace std;

enum Demo {one, two, three};

int main()
{
    Demo var1 = one;
    Demo var2 = two;

    // Compare enum variables
    if (var1 > var2) cout << "var1 > var2" << endl;
    if (var2 > var1) cout << "var2 > var1" << endl;

    // Compare enum variable and enum value
    if (var1 > one) cout << "var1 > one" << endl;
    if (var1 < one) cout << "var1 < one" << endl;
    if (var1 == one) cout << "var1 == one" << endl;

    // Compare enum values
    if (one > two) cout << "one > two" << endl;
    if (one < two) cout << "one < two" << endl;
}