package ru.tsibrovskii.lesson1.Loops;

public class Square {
	
	double a, b, c;
	
	float y;
	
	public Square(double a, double b, double c) {
		this.a = a;
		this.b = b;
		this.c = c;
	}
	
	public float calculate(int x) {
	
		y = (float) (a * Math.pow(x, 2) + b * x + c); 
					
		return y;
		
	}
	
	public static void main(String[] args) {
		
		double a = Double.valueOf(args[0]);
		double b = Double.valueOf(args[1]);
		double c = Double.valueOf(args[2]);
		int x1 = Integer.valueOf(args[3]);
		int x2 = Integer.valueOf(args[4]);
		int step = Integer.valueOf(args[5]);
		
		Square calc = new Square(a, b, c);
		
		for (int i = x1; i <= x2; i = i + step) {
			
			System.out.println(calc.calculate(i));
			
		}
	}
}
@@ -79,20 +79,8 @@
 ;%0A%09%0A
-%09float y;%0A%09%0A
 %09pub
@@ -207,14 +207,21 @@
  %7B%0A%09
-%0A%09%09y =
+%09%09%09%09%0A%09%09return
  (fl
@@ -262,27 +262,8 @@
  c);
- %0A%09%09%09%09%09%0A%09%09return y;
 %0A%09%09%0A
@@ -684,8 +684,9 @@
 %09%09%7D%0A%09%7D%0A%7D
+%0A

delete y