What will be the correct syntax for running two variable for loop simultaneously?

Hoàng Minh An

New member
What will be the correct syntax for running two variable for loop simultaneously?
A.
Code:
   for (i = 0; i < n; i++)
   for (j = 0; j < n; j += 5)
B.
Code:
for (i = 0, j = 0; i < n, j < n; i++, j += 5)
C.
Code:
   for (i = 0; i < n;i++){}
   for (j = 0; j < n;j += 5){}
D. none of the mentioned
 

Tìm kiếm

Back
Top