Advertisement
Guest User

Untitled

a guest
Apr 5th, 2020
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.28 KB | None | 0 0
  1. double num1 = 4 / (8 * i + 1);
  2. double num2 = 2 / (8 * i + 4);
  3. double num3 = 1 / (8 * i + 5);
  4. double num4 = 1 / (8 * i + 6);
  5. double numdiff = num1 - num2 - num3 - num4;
  6. pi2 += numdiff * (1 / Math.Pow(16,i));
  7. }
  8. Console.WriteLine("Po kLim iteracjach, liczba pi wynosi =
  9. {0}\n", pi2);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement