0
Question regarding loops
For ( j=1 ; j < n ; j + = ) In this loop what does j + = mean ?
2 Antworten
+ 5
Addition assignment
for (j=1 ; j < n; j += i) // the value "i" will be added to the current value "j" for each loop until the value "j" becomes "n"
+ 2
j += is incomplete statement.
In addition to explained j += i,
If You may mean j++; then j value incremented by 1. It is short of j += 1. And j += i is short form of j = j + i ;