LaYatiX

Untitled

Apr 20th, 2021 (edited)
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3.  
  4. int main() {
  5. int i = 0;
  6. char* buffer = (char*) calloc(1073741824,1);
  7. printf("Zakonczono alokacje pamieci\n");
  8. scanf("%d",&i);
  9. free(buffer);
  10. return 0;
  11. }
  12.  
  13. #include <stdio.h>
  14. int main(void){
  15. unsigned long n = 4294967295, i;
  16. long double x;
  17.  
  18. x = 1.0;
  19.  
  20. for (i=1; i<n; i=i+1){
  21. if (i%2 == 1)
  22. x = x - (1.0 / ((2.0*i)+1));
  23. else
  24. x = x + (1.0 / ((2.0*i)+1));
  25. }
  26. x = x * 4.0;
  27. printf("The value of pi is: %.20Lf\n", x);
  28. return 0;
  29. }
  30.  
  31. curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
  32. https://github.com/facebook/create-react-app
  33. https://github.com/oldboyxx/jira_clone
  34.  
Add Comment
Please, Sign In to add comment