title: How to get range like this in an array using C/C++?
body: <p>For example, there is an array <code>a</code> of size 10 contain data as follow:</p>
  
  <pre><code>0.0
  0.01
  0.02
  0.03
  5.04
  6.05
  7.06
  13.07
  20.08
  22.09
  </code></pre>
  
  <p>If the step fixed is 5, expected data range are:</p>
  
  <pre><code>start   end
  0.0     0.03
  5.04    7.06
  13.07   13.07
  20.08   22.09
  </code></pre>
  
  <p>Any suggestions to implement it like this in C/C++ ? How to program?</p>