import javax.swing.JOptionPane;

class H2AL9_2000
{
public static void main(String args[])
{
int i;
       double pi=0;
       int artieksi=-1;
       for(i=1;i < 100000;i++)
       {
          artieksi*=-1;
          pi+=4/(2.0*i-1.0)*artieksi;
       }
       String s="pi : "+pi+"\n";
       s=s+"pi nin gercek degeri: "+Math.PI;
 JOptionPane.showMessageDialog(null,s,"pi sayısı hesabı",
JOptionPane.PLAIN_MESSAGE);
System.exit(0);
}
}
