For Loop with condition

how to write in rust?
i try it like:
for j in (0..i-1).rev()
but it will not give the desire output

I think that C code is equivalent to (0..i).rev(). I.e. it is the same indices as 0..i, but reversed.


I got it thanks

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.