If you have a for loop like this:
for(j = 0; j<=90; j++){}
It works fine. But when you have a for loop like this:
for(j = 0; j<=90; j+3){}
it doesn't work. Could someone please explain this to me?
That’s because j+3
doesn’t change the value of j
. You need to replace that with j = j + 3
or j += 3
so that the value of j
is increased by 3:
for (j = 0; j <= 90; j += 3) { }