Assignment #82: Counting By Halves

Code

public class ByHalves {

    public static void main (String[] args) {
    
        for (double n = -10; n <= 10; n = n + 0.5) {
        
            System.out.println(n);
            
        }
        
    }
    
}
    

Picture of the output