50 double soucet (
double a,
double b) {
return a + b; }
52 double soucin (
double a,
double b) {
return a * b; }
54 double akumulator(
double (*fce)(
double,
double),
double cisla[],
int pocet) {
60 for (i=1; i<pocet; i++) {
62 acc = (*fce)(acc, cisla[i]);
72 for (i=0; i<PNELEM; i++)
75 printf(
"Suma je: %g\n", akumulator(soucet,p,PNELEM));
76 printf(
"Produkt je: %g\n", akumulator(soucin,p,PNELEM));