title: What is Wrong With my Code?, How can i improve it any further?
body: <p>The problem is that my program does not give accurate average for numbers with more than 9 digits.</p>
  <p>Can somebody point out what am I doing wrong and how do I fix that? Is there anything I can do to improve the code any further?</p>
  <p>The code is</p>
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main(){
      cout &lt;&lt; &quot;                 Average Finder           \n&quot;;  //So that the title is displayed properly.
      int NUM1,NUM2,AVG;  /*I am defining the variables as integers, seemed like the best option.
                            Should I use long float? Does that even work?*/ 
      cout &lt;&lt; &quot;Type the First Number:   &quot;; // for the display
      cin &gt;&gt; NUM1; // the program asks for the first user input and stores it in integer variable NUM1
      cout &lt;&lt; &quot; \n&quot;;
      cout &lt;&lt; &quot;Type the Second Number:  &quot;;
      cin &gt;&gt; NUM2;  // the program asks for the second user input and stores it in integer variable NUM2
      cout &lt;&lt; &quot; \n&quot;;
      AVG = ((NUM1+NUM2)/2); //this line calculates their average
      cout &lt;&lt; &quot;The Average of given numbers is = &quot;;
      cout &lt;&lt; AVG;
      
      return 0;
  }
  </code></pre>
  <p>Here is the command line executions.</p>
  <pre class="lang-none prettyprint-override"><code>PS D:\Workspace\Coding\C++&gt; .\ALG001.EXE
  
                   Average Finder
  Type the First Number:   1111111111
  
  Type the Second Number:  1111111111
  
  The Average of given numbers is = -1036372537
  </code></pre>