package main;

import approximation.Lagrange;

/**
 * Main class
 * @author Pavel_Verkhovtsov
 */
public class Main {

	private static double[] y = {2.02, 1.98, 1.67, 1.65, 1.57, 1.42, 1.37, 1.07, 0.85, 0.48, 0.35, -0.30, -0.61, -1.2, -1.39, -1.76, -2.28, -2.81, -3.57, -4.06};
	private static double[] x = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};

	/**
	 * Main method.
	 * @param args console parameters
	 */
	public static void main(final String[] args){
		Lagrange lagrange = new Lagrange(x, y);
		System.out.println(lagrange.approximazeFunction(2));
	}
}

@@ -8,16 +8,43 @@
  main;%0A%0A
+import java.util.Scanner;%0A%0A
 import a
@@ -463,16 +463,47 @@
 rs%0A%09 */%0A
+%09@SuppressWarnings(%22resource%22)%0A
 %09public 
@@ -583,16 +583,121 @@
 (x, y);%0A
+%09%09System.out.print(%22Input approximation point: %22);%0A%09%09double point = new Scanner(System.in).nextDouble();%0A
 %09%09System
@@ -738,17 +738,21 @@
 unction(
-2
+point
 ));%0A%09%7D%0A%7D

Add console input approximation point