MrDoyle

For) X´s & Y´s

Nov 13th, 2020
499
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1. public class Main {
  2.  
  3.     public static void main(String[] args) {
  4.         System.out.println(" x      y    ");
  5.         System.out.println("-----------");
  6.         double x = -10;
  7.  
  8.  
  9.         for (x = x ; x <= 10 ; x = x + 0.5){
  10.             double y = x*x;
  11.             System.out.println(x + " \t " + y);
  12.         }
  13.     }
  14. }
  15.  
  16.  
Advertisement
Add Comment
Please, Sign In to add comment