Site menu

CodeCook.io

  • Languages
    • C
    • C++
    • CSS
    • Git
    • HTML
    • Java
    • JavaScript
    • jQuery
    • PHP
    • Python
    • Ruby
    • Scala
  • for
  • loop

C++ - Counter loop

Execute piece of code for a range of numbers.

  • Default
  • Loop 10

Execute body for integers 0 to 10 including 0 and excluding 10.

0
668
  • Share on Facebook
  • Share on Google+
  • Share on Twitter

For

for(int i = {{start}}; i < {{stop}}; ++i) {
  {{body}}
}
cpp

Notes

last update: Oct. 26, 2014

Advertisement

This project is hosted on DigitalOcean, try it and support us

Other language

  • Java
  • Scala
  • Python
  • JavaScript
  • PHP
  • Ruby

Random task

  • Single comment
  • Search apt package
  • Sort objects by function
  • Lower case string
  • List group users
  • Blog
  • About
  • License