For each part below show a for loop that advances the loop index variable (call it i in each case) as shown. For example the loop body can just print the value of i.
- From 1 to 10 (inclusive)
- From 0 to 10 (inclusive) by steps of two. For example: 0, 2, 4, etc.
- From 1 to 1024 (inclusive) doubling each time. For example: 1, 2, 4, 8, 16, etc.
- From 10 down to 1 (inclusive).
- From 1.0 down to the smallest number still greater than 0.1, cutting the value in half each time. For example: 1.0, 0.5, 0.25, 0.125.