[C++] modulo and multiple if needed
Intuition\n Describe your first thoughts on how to solve this problem. \nIf the number is even we are done, otherwise multiple by 2.\n\n# Approach\n Describe yo
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nIf the number is even we are done, otherwise multiple by 2.\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nFollow our intuation.\n\n# Complexity\n- Time complexity: $$O(1)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(1)$$\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int smallestEvenMultiple(int n) {\n        return n % 2 == 0 ? n : 2 * n;\n    }\n};\n```
['C++']