How to print a negative number as 0?
<p>For class I've made a turn based fighting game that keeps track of the user's health with: <code>Player.HP = 100;</code> (inside a structure)</p>

<p>It's printed with <code>cout &lt;&lt; "Health: " &lt;&lt; Player.HP &lt;&lt; endl;</code></p>

<p>The do while loop is exited once their health or the computer opponents health is equal or less than 0</p>

<pre><code>} while ((Player.HP &gt;= 0) &amp;&amp; (com.HP &gt;= 0));
</code></pre>

<p>If for instance the health is equal to -14 is there a way to have it printed as 0 in a cleaner way than using an if statement?</p>