import javax.swing. JOptionPane; // program poweres class Scanner

public class BPIMTE3
{
     // main method begins execution of Java application
     public static double y(double x)
     {
        // y(x) = x^2+3x-7;        
      return x*x+3*x-7;      
      }// end method exp
	 
     public static void main( String args[] )
     {            
        String s; 
        double x=Double.parseDouble(JOptionPane.showInputDialog("x = ")); 
        s="y("+x+") = "+y(x);
        JOptionPane.showMessageDialog(null,s,"function calculation",JOptionPane.PLAIN_MESSAGE);
     } // end method main
} // end class BPIH4E1