title: Running time of program
body: <p>The program listed below outputs 0 on the screen. Why? Does it mean that my computer is fast or something is wrong in the code?</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cstdio&gt;
  #include &lt;ctime&gt;
  using namespace std;
  
  int main(){
      int j=0;
      clock_t start=clock();
       for (int i=0;i&lt;22220;i++){
           i++;
           j++;
           j+=i;
          // sleep(10);
       }
  
       clock_t final=clock()-start;
       cout&lt;&lt;final/ (double) CLOCKS_PER_SEC&lt;&lt;endl;
  
       return 0;
  }
  </code></pre>