Assignment = X and Y

Code

  /// Name: Sam Wilson
  /// Period: 6
  /// Program Name: X and Y
  /// File Name: counting15.java
  /// Date Finished: 2/27/16
 
  import java.util.Scanner;
import java.util.Random;
    
    public class counting15
    {
        public static void main(String[] args)
        {
            
            System.out.println("x          y");
            System.out.println("---------------");
            
            for ( double x = -10; x < 10.5; x = x + 0.5) 
            {
                System.out.println(x+"     "+ (x*x) );
            }
        }
    }

    

Picture of the output

Assignment 31