Assignment #83

Code

    /// Name:Mahima Choudhary
    /// Period: 6
    /// Program Name: Xs and Ys
    /// File Name: XAndY.java
    /// Date Finished: 1/8/2015
    
    public class XAndY
    {
        public static void main(String[] args)
        {
            System.out.println("x       y");
            System.out.println("---------------");
            
            for( double x = -10; x <= 10; x = x + 0.5 )
            {
                double y = (x*x);
                System.out.print(x + "    ");
                System.out.println(y);
            }
        }
    }
    

Picture of the output

Assignment 83