title: How Can One Use a Count Down For-Loop to Count Up Squares?
body: <p>To paraphrase my question, I want to use a for-loop that counts down but prints numbers by increasing order. In my case, I want a for-loop that prints squares. Here is my current code:</p>
  
  <pre><code>//countdown to countup. Output should be : 0 1 4 9 16 25 36 49 64 81
  
  for(int x = 10; x &gt; 0; x--)
  {
      System.out.print((int)Math.pow(10,2)); // maths goes here
  
  }
  </code></pre>
  
  <p>This code segment is almost done, I just want to know what the math is. It's either I'm over thinking it or I'm outright missing something.</p>
  
  <p>Any help is appreciated!</p>