Task

Create an enumeration of constants with and without explicit values.




enum fruits { apple, banana, cherry }
 
enum fruits { apple = 0, banana = 1, cherry = 2 }
 
enum fruits : int { apple = 0, banana = 1, cherry = 2 }
 
[FlagsAttribute]
enum Colors { Red = 1, Green = 2, Blue = 4, Yellow = 8 }