import javax.swing.*; // program uses class Scanner

public class BPIH4E9B
{
     // main method begins execution of Java application
     public static void main( String args[] )
     {            
        double x1; // first number to add   
        double x2;  //last number to add
        double dx;      
        double y;
        x1=Double.parseDouble(JOptionPane.showInputDialog("Enter first double: ")); // read number
        x2=Double.parseDouble(JOptionPane.showInputDialog("Enter last double: ")); // read number
        dx=Double.parseDouble(JOptionPane.showInputDialog("Enter increment step: ")); // read number 
        String s="";
        for( double x=x1;x<=x2; x+=dx)
        { y=5.67*x*x+ 2.25*x-3.25;// calculate y
          s+="x = "+x+" y = "+y+"\n";
        } 
        JOptionPane.showMessageDialog(null,s,"function calculation",JOptionPane.PLAIN_MESSAGE); //display x and y
     } // end method main
} // end class BPIH4E9
