Untitled
unknown
plain_text
2 years ago
349 B
23
Indexable
#include<stdio.h>
#define f(x)(a*x*x+b*x+c)
float a,b,c;
void main()
{
float x,h,d;
printf("Enter the coefficients of quadratic polynomial a b and c:\n");
scanf("%f%f%f",&a,&b,&c);
printf("enter x:");
scanf("%f",&x);
printf("enter h:");
scanf("%f",&h);
d = (f(x) - f(x-h))/h;
printf("derivative at x=%.3f is = %.3f",x,d);
}
Editor is loading...