Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.company;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- double start = -10;
- double end = 10;
- double by = 0.5;
- Scanner keyboard = new Scanner(System.in);
- System.out.println("x y");
- System.out.println("-----------------------");
- double count=0;
- for (double n = start; n <= end; n = n + by) {
- System.out.println(n + "\t "+ n*n);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement