title: Convert while loop to an equivalent for loop
body: <p>Here is the code which have while loop and i want the help to get thos code converted in the equivalent for loop</p>
  
  <pre><code> #include&lt;stdio.h&gt;
      void main()
      {
          int x = 1;
          int y;
          while(x&lt;=10)
          {
              y=x*x;
              cout&lt;&lt;x&lt;&lt;endl&lt;&lt;y;
              x = x+3;
              getch()
          }
  </code></pre>