Problem 68
Counting By Halves
Write a program that uses a for
loop.
With the loop, make the variable x
go from -10
to 10
, counting by 0.5
.
(This means that x
can’t be an int
.)
x ------ -10.0 -9.5 -9.0 -8.5 -8.0 . . . 9.0 9.5 10.0
◄ 67: Counting Machine Revisited 69: Xs and Ys ►
Adapted from ProgrammingByDoing.com
©2013 Graham Mitchell
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.