Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main() {
- double pi=0;
- for(int i=0; i<100; i++) {
- pi+=(1/powf(16, i)) * ((4 / (8*i + 1)) - (2 / (8+i + 4)) - (1 / (8*i + 5)) - (1 / (8*i + 6)));
- printf("%d\n", &pi);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement