PROGRAMMING AND CODE


Assignemnt #83

Code

/// Name: Justin Li
/// Period: 7
/// Program Name: XsandYs
/// File Name: XsandYs.java
/// Date Completed: 2/16/16

import java.util.Scanner;

public class XsandYs
{
    public static void main( String[] args )
    {
        Scanner keyboard = new Scanner(System.in);
        
        double x, y;
        
        System.out.println("x    y");

        for (x = -10; x<= 10; x+= .5)
        {
            y = x * x;
            System.out.print(x + "     " + y + "\n");
        }
        System.out.print( " \n" );
        
    }
}
    

Picture of the output

Assignment 1