title: for loop to generate "1,4,9,16,25,36,49,64,81,100"
body: <p>how can I write a for loop to give this output? I was thinking a nested loop?</p>
  
  <pre><code>for (int i = 0; i &lt; 100; i++){
      for (int j = 0; j &lt; i; j++) {
  </code></pre>
  
  <p>but i don't know how to go from there?</p>
  
  <p>thanks</p>