SHARE
TWEET

Untitled

a guest May 24th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     start = clock();
  2.     double *integrals = new double[INTEGRAL_COUNT];
  3.     for (int k = 0; k<INTEGRAL_COUNT; k++) {
  4.         integrals[k] = 0;
  5.         for (double y = Y_START; y <= Y_END; y += INTEGRAL_STEP) {
  6.             for (double x = X_START; x <= X_END; x += INTEGRAL_STEP) {
  7.                 integrals[k] += integral(k + 1, x, y)*INTEGRAL_STEP*INTEGRAL_STEP;
  8.             }
  9.         }
  10.     }
  11.  
  12.     cout << "time: " << clock() - start << endl;
  13.  
  14.     for (int k = 0; k<INTEGRAL_COUNT; k++) {
  15.         cout << "dla k = " << k + 1 << " wartosc calki wynosi: " << integrals[k] << endl;
  16.     }
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