Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. public class Uppgift11b {
  2. public static void main(String[] args) {
  3.  
  4.  
  5. double n = 1;
  6. double kvot = 1;
  7. double kvot2 = (-1/3);
  8. double Sum;
  9. while( Math.abs(kvot) > 0.00001 || Math.abs(kvot2) > 0.00001); {
  10.  
  11.  
  12.  
  13. kvot = 1/(1+4*n);
  14. kvot2 =(-1)/(3+4*n);
  15. Sum = kvot + kvot2;
  16.  
  17. n++;
  18.  
  19. System.out.println(Sum);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement