Answers for "Ranged for loop and auto type to print the contents"

C++
-1

iterate over a range in c++

for (int i=0; i<5; ++i) {
  cout << i << " ";
}
// output is 0 1 2 3 4; note 5 is excluded since < is used and not <=
Posted by: Guest on September-13-2020

Code answers related to "Ranged for loop and auto type to print the contents"

Browse Popular Code Answers by Language