>for</span></code> loop when the number of repetitions is
known (definite); use a <code class="language-c++ highlighter-rouge"><span class="k">while</span></code> loop when the number of repetitions is
unknown (indefinite).</p>

    <div class="language-c++ highlighter-rouge"><div class="highlight"><pre class="highlight"><code>  <span class="c1">// loop exactly n times</span>
  <span class="k">for</span> <span class="p">(</span><span class="kt">int</span> <span class="n">i</span> <span class="o">=</span> <s