Advertisement
Kwintendr

Untitled

Jan 15th, 2013
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.25 KB | None | 0 0
  1.  
  2. public class Reeksontwikkeling {
  3.  
  4.     /**
  5.      * @param args
  6.      */
  7.     public static void main(String[] args) {
  8.        
  9.        
  10.         double som = 0;
  11.         for (int i = 0; i<10; i++){
  12.             som = som + ((1)/(2*i+1))*(Math.pow(-1,i));
  13.         }
  14. System.out.println(som);
  15.     }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement