Ways to find maximum digit
<p>Currently my mini algorithm looks like this.</p>

<pre><code>int a,b,c,max;
cout &lt;&lt;"Enter 3 digits: \t";
cin&gt;&gt;a&gt;&gt;b&gt;&gt;c;
if(a&gt;b &amp;&amp; a&gt;c)
    max=a;
else if(b&gt;c &amp;&amp; b&gt;a)
    max=b;
else
    max=c;
cout &lt;&lt;"max: "&lt;&lt;max&lt;&lt;endl;
</code></pre>

<p>It works but Is there any other way to find maximum of 3 digits?</p>
