Assignemnt #83 and XY.java

Code

    /// Name: Boris Kazantsev
    /// Period: 6
    /// Program Name: XY
    /// File Name: XY.java
    /// Date Finished: 2/22/2016
    
    import java.util.Scanner;

    public class XY{
        public static void main(String[] args){
            Scanner keyboard = new Scanner(System.in);
            
            int countFrom = -10;
            
            int countTo = 10;
            
            float countBy = .5f;
            
            System.out.println("  X     Y   ");
            System.out.println("------------");
            for (int i = 0; i <= countTo/countBy - countFrom/countBy; i++){
                System.out.print(((countFrom + countBy *i) <10?" ":"") + (countFrom + countBy*i)+ "    ");
                System.out.print((countFrom + countBy*i)*(countFrom + countBy*i)+"\n");
            }
            System.out.print("\n");
        }
    }


   
    

Picture of the output

Assignment 83