Can we initialize multiple values in a for loop?

  • Thread starter Thread starter Frankdot
  • Start date Start date
F

Frankdot

Guest
Hello,

I have a variable Y returning values 1,2,3,4.

Is it possible to initialize Y in a for loop and get the return for each values?

for(int i = 0; i < 10; i++)



Replace 0 by Y and it will return in one shot without having to repeat 4 For loops or create 4 variables like Y, U, P, X..

1,2,3,4,5,6,7,8,9, 10

2,3,4,5,6,7,8,9,10

3,4,5,6,7,8,9,10

4,5,6,7,8,9,10


Thank you


Continue reading...
 
Back
Top