/***************************************************************
* Name: Rafael Orta
* Course: Computer Science & Programming
* Class: CS04103 Section: 5
* Assignment Date: 09/21/23
* File Name: switch.cpp
*****************************************************************
* Lecture #: 3
* Purpose: Demonstrate the use of enumerators
*****************************************************************/
#include <iostream>
using namespace std;
// Declaring an enumerator , this is a user defined data type
enum week { Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday };
int main()
{
week today; // week is now a data type to be more specific a user defined data type.
today = Wednesday; // Notice there is no quotes around Wednesday
cout << "Day " << today+1; // Enumerators start with a positional value of 0
return 0;
}