Advertisement
sellmmaahh

Izvod Funkcije

Jul 28th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4.  
  5. using namespace std;
  6.  
  7.  
  8. double IzvodFunkcije (double f(double), double x, double h=1e-5)
  9. {
  10.     return (f(x+h)-f(x))/h;
  11. }
  12.  
  13. int main () {
  14.     cout<<(IzvodFunkcije(sin,0));
  15.  
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement