I want to make a loop in a program that will have specific amplitude and the counter will take all the possible values of this amplitude.
For example in a for loop we have:
- Code: Select all
for(i=0;i<N;i++){
...//code
}
At this for loop the counter i takes the values from 0...N-1.
At my custom loop, i want to give the start point for the counter i but after that will take all the values to N-1 plus the values before tha start point.
Example: For N=6 if counter i starts from 4, it will take the values: i=4,i=5,i=6,i=0,i=1,i=2,i=3 (a complete loop for N=6).
thanks
**update: not necessery to be for loop, i am interested for the behavior of i counter.
