how to make for loop run til user number in c++ code example Example: for loops in cpp for(int i=0; i<=limit; i++) { //statement }