Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string_view>
- enum day_of_week{
- sunday = 1,
- monday,
- teusday,
- wednesday,
- thursday,
- friday,
- saturday
- } day_of_week;
- constexpr std::string_view days [] =
- {"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};
- int main()
- {
- enum day_of_week today = sunday;
- std::cout << today << std::endl;
- std::cout << days[(today+10)%7] << std::endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement