You intend to increment num by .25 and 1 at the same time (I assume you want it to increase by .25 each loop). After the first loop the for loop already cancels itself out.
Also the cout displays the results after num got incremented. Instead of showing results of 9 it shows results of 9.25.
Last edited on