

Task

Demonstrate a   for-loop   where the step-value is greater than one.



Related tasks

   Loop over multiple arrays simultaneously
   Loops/Break
   Loops/Continue
   Loops/Do-while
   Loops/Downward for
   Loops/For
   Loops/For with a specified step
   Loops/Foreach
   Loops/Increment loop index within loop body
   Loops/Infinite
   Loops/N plus one half
   Loops/Nested
   Loops/While
   Loops/with multiple ranges
   Loops/Wrong ranges


 
(for ((i (in-range 0 15 2))) (write i))
    0 2 4 6 8 10 12 14
 
(for ((q (in-range 0 15 14/8))) (write q))
    0 7/4 7/2 21/4 7 35/4 21/2 49/4 14 
 
(for ((x (in-range 0 15 PI))) (write x))
    0 3.141592653589793 6.283185307179586 9.42477796076938 12.566370614359172 
 