title: How to Find Max and Min values?
body: <pre><code>#include&lt;iostream&gt;
  main()
  {
      int limit,input;
      int sum=0;
      int i;
      std::cout&lt;&lt;"Please Enter the limit: ";
      std::cin&gt;&gt;limit;
      for(i=0;i&lt;limit;i++)
      {
          std::cout&lt;&lt;"Please Input values: ";
          std::cin&gt;&gt;input;
          sum+=input;
      }
      std::cout&lt;&lt;"The sum of the values is: "&lt;&lt;sum;
      std::cout &lt;&lt; std::endl;
      std::cout&lt;&lt;"The average of the values is: "&lt;&lt;sum/1+i;
  
  
  }
  </code></pre>
  
  <p>What to do if i want to find Max and Min Values from the values input by the user?</p>