title: Can you set a maximum limit to an integer (C++)?
body: <p>If I never want an integer to go over 100, is there any simple way to make sure that the integer never exceeds 100, regardless of how much the user adds to it?</p>
  <p>For example,</p>
  <pre><code>50 + 40 = 90
  50 + 50 = 100
  50 + 60 = 100
  50 + 90 = 100
  </code></pre>