Jim

found prority errors

No preview for this file type
... ... @@ -40,16 +40,18 @@ double f (double x){
int main (){
int i;
double *func_val;
double max;
//double max;
getvars();
h = b - a / (double)varmas[4] - 1.0;//calculate fixed step
h = (b - a) / ((double)varmas[4] - 1.0);//calculate fixed step
printf ("h debug value %f\n", h);
func_val = malloc (sizeof (double) * varmas[4]);
for (i=0; i < varmas[4]; i++){
x = a + i * h;
//rintf ("x debug value %f\n", x);
func_val[i] = f(x);
printf ("x value: %f, function in that point: %f\n", x, func_val[i]);
}
... ...