Advertisement
Guest User

Untitled

a guest
Dec 15th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main() {
  5. double pi=0;
  6. for(int i=0; i<100; i++) {
  7. pi+=(1/powf(16, i)) * ((4 / (8*i + 1)) - (2 / (8+i + 4)) - (1 / (8*i + 5)) - (1 / (8*i + 6)));
  8. printf("%d\n", &pi);
  9. }
  10. return 0;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement