title: Comparing Integers C++
body: <p>Hey So I am learning basic c++ just started this week, I have a question that says:</p>
  
  <p>Write a program to compare 3 integers and print the largest, the program should ONLY Use 2 IF statements.</p>
  
  <p>I am not sure how to do this so any help would be appreciated </p>
  
  <p>So far I have this:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  void main()
  {
  int a, b, c;
  
  cout &lt;&lt; "Please enter three integers: ";
  cin &gt;&gt; a &gt;&gt; b &gt;&gt; c;
  
  if ( a &gt; b &amp;&amp; a &gt; c) 
      cout &lt;&lt; a;
  else if ( b &gt; c &amp;&amp; b &gt; a)
      cout &lt;&lt; b;
  else if (c &gt; a &amp;&amp; c &gt; b)
      cout &lt;&lt; b;
  
  system("PAUSE");
  
  }
  </code></pre>