Count the number of months to October of the following year, modulo 12.
cout << (22 - a) % 12;
More Related Contents:
- Why compiler gives the message "call of overloaded function is ambiguous" here in C++11?
- How does vector’s growth function work? [closed]
- What are transparent comparators?
- How to create an std::function from a move-capturing lambda expression?
- Is it safe to link C++17, C++14, and C++11 objects
- Strongly typed using and typedef
- C++11 aggregate initialization for classes with non-static member initializers
- Is auto as a parameter in a regular function a GCC 4.9 extension?
- Is a pointer with the right address and type still always a valid pointer since C++17?
- Deleted default constructor. Objects can still be created… sometimes
- Why are lambda expressions not allowed in an unevaluated operands but allowed in the unevaluated portions of constant expressions?
- Capturing perfectly-forwarded variable in lambda
- Parallel Loops in C++
- How to extract the source filename without path and suffix at compile time?
- Why was 1
- Arity of a generic lambda
- Which headers in the C++ standard library are guaranteed to include another header?
- How to make std::make_unique a friend of my class
- Why was the space character not chosen for C++14 digit separators?
- Compile c++14-code with g++
- Raw pointer lookup for sets of unique_ptrs
- Classes with both template and non-template conversion operators in the condition of switch statement
- Why does constexpr static member (of type class) require a definition?
- Deleted Function in std::pair when using a unique_ptr inside a map
- Why do lambda functions drop deduced return type reference by default?
- Using std::make_unique with a custom deleter
- Use of ‘auto func(int)’ before deduction of ‘auto’ in C++14
- What’s the standard/official name for universal references?
- Injected class name compiler discrepancy
- Reference invalidation after applying reverse_iterator on a custom made iterator