Answers for "c++ for loop multiple variables"

C++
4

for loop with 2 variables in c++

for (int x=0, y=0 ; x < 10 && y < 10 ; x++, y++)
{
    // Your code here
}
Posted by: Guest on July-07-2020
0

c++ for loop multiple variables

// Need to initialize both x and y individually
for(int x=0, y=0; x + y < z; x++, y++) { /* code */ }
Posted by: Guest on October-12-2020

Code answers related to "c++ for loop multiple variables"

Browse Popular Code Answers by Language