Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Uppgift11b {
- public static void main(String[] args) {
- double n = 1;
- double kvot = 1;
- double kvot2 = (-1/3);
- double Sum;
- while( Math.abs(kvot) > 0.00001 || Math.abs(kvot2) > 0.00001); {
- kvot = 1/(1+4*n);
- kvot2 =(-1)/(3+4*n);
- Sum = kvot + kvot2;
- n++;
- System.out.println(Sum);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement