Advertisement
Cichacz

Ulam

Dec 27th, 2011
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. void Ulam(int iloscPar,double &sumaWartosciZwracanych,double (*f)(double), int acc, double a, ...)
  2. {
  3. va_list ap;
  4. va_start(ap,a);
  5.  
  6. sumaWartosciZwracanych=Ulam(f,a,va_arg(ap,double));
  7.  
  8. for(int i=1; i<iloscPar; i++)
  9. {
  10. sumaWartosciZwracanych+=Ulam(f,va_arg(ap,double),va_arg(ap,double));
  11. }
  12.  
  13. va_end(ap);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement