C-Kurs/integral/Musterlösung
< C-Kurs | integral
Version vom 24. September 2009, 08:48 Uhr von 130.149.17.40 (Diskussion) (Die Seite wurde neu angelegt: „ #include <stdio.h> #include <math.h> double hoch2(double x){return x*x;} double integral(double (*fp)(double),double a,double b,double h) { double erg=0...“)
#include <stdio.h> #include <math.h> double hoch2(double x){return x*x;} double integral(double (*fp)(double),double a,double b,double h) { double erg=0.0; for(;a<b;a+=h) erg+=(*fp)(a); return erg*h; } int main(){ printf("%lf \n",integral(&hoch2,0.0,3.0,0.005)); }