Advertisement
lol1234561

Untitled

Mar 16th, 2023
631
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class Main {
  3.     public static void main(String[] args) {
  4.         Scanner keyboard = new Scanner(System.in);
  5.         System.out.println("x        y");
  6.         System.out.println("----------------");
  7.  
  8. double y;
  9.         for ( double x = -10 ; x <= 10 ; x = x+0.5 ) {
  10.             y = x * x;
  11.             System.out.println(x + " \t" + y);
  12.         }
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.     }
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement