title: Compile error - can somebody please correct me?
body: <p>I just created a code which represents the sum of integer values from 1 to 10.</p>
  
  <pre><code>public class ArithmeticProgress {
  
      public static void main(String args[]) {
          int i = 10;
          int n;
          System.out.println(arithmeticprogress(n, i));
      }
  
      static int arithmeticprogress(int n, int i) {
          int result = n;
          for (n = 0; n &lt; i; n++)
              result += result;
          return result;
      }
  }
  </code></pre>
  
  <p>Unfortunately, it does not compile and therefore it only shows error. Can somebody tell me how to correct this code? Thank you!</p>