Counting by Halves

Code

    /// Name: Rachel Smith
    /// Period: 5
    /// Program Name: Counting by Halves
    /// File Name: ByHalves.java
    /// Date FInished: 12/10/2015
    
    public class ByHalves {
        
        public static void main( String[] args ) {
            
            double x;
            
            System.out.println( "x" );
            System.out.println( "------" );
            
            for ( x = -10; x <= 10; x = x+0.5 ) {
                System.out.println( x );
            }
            
        }
    }

    

Picture of the output

Assignment 1