// Ex540.cc // Sec. 5.4 of lecture // enum #include main() { // new enum enum tag { montag, dienstag, mittwoch, donnerstag, freitag, samstag, sonntag }; // Variable of enum type tag wochentag; int i,j; bool bi; // Data init wochentag = montag; if ( wochentag == montag ) { cout << "Schlechte Laune" << endl; } cout << " i : "; cin >> i; bi = i < 8; for (j=1; j<=5; j++) { if (bi) { cout << "use stored test result = " << bi << endl; } } }