Assignment 83

Code

    public class XandY
    {
        public static void main( String[] args )
        {
        
            
            System.out.println("x" + "\ty");
            System.out.println("__________________________");
            
            for ( double x = -10.0; x <= 10; x = x + .5 )
            {
                double y = x*x;
                
                System.out.println( x + "\t" + y );
            }
        }
    }  
    

Picture of the output

Assignment