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

public class BPIH4E5B
{
     // main method begins execution of Java application
     public static void main( String args[] )
     {            
        int x1; // first x to plot  
        int x2; // last x to plot 
        int y=0;                     
        x1=Integer.parseInt(JOptionPane.showInputDialog("Enter first number: ")); // read number
        x2=Integer.parseInt(JOptionPane.showInputDialog("Enter last number: "));  // read number       
        String star="*";
        String space=" ";
        String sum=star;
        String s="";
        for(int x=x1;x<=x2;x++)
        {   y=x*x+2*x+1;  //function to be plotted
            for(int i=0;i<y;i++)
            { sum = space+sum;}
            s+=sum+"\n";
            sum=star;
        }
        JOptionPane.showMessageDialog(null,s,"star plot",JOptionPane.PLAIN_MESSAGE);
     } // end method main
} // end class BPIH4E1
