SHARE
TWEET

Untitled

a guest Jun 21st, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #include <stdio.h>
  3. #include <math.h>
  4.  
  5. double a(void) {
  6.   double s = 0.0;
  7.    int x = 37;
  8.    for (int i = 0; i < 1000; ++i) {
  9.       s+= pow(i, x);
  10.    }
  11.    return s;
  12. }
  13.  
  14. double b(void) {
  15.   double s = 0.0;
  16.    int x = 96;
  17.    for (int i = 0; i < 1000; ++i) {
  18.       s+= pow(i, x);
  19.    }
  20.    return s;
  21. }
  22.  
  23. double c(void) {
  24.   double s = 0.0;
  25.    int x = 77;
  26.    for (int i = 0; i < 1000; ++i) {
  27.       s+= pow(i, x);
  28.    }
  29.    return s;
  30. }
  31.  
  32. int main(int argc, char **argv) {
  33.    for (int i = 0; i < 1000; ++i) {
  34.         printf("%f", a());
  35.         printf("%f", b());
  36.         printf("%f", c());
  37.    }
  38. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top