|
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
double f(double a, double b, double c, double x)
{
return (a*pow(x,2.0) + b*x + c);
}
int main(void)
{
double a,b,c,x;
a = 2.0;
b = 3.0;
c = 4.0;
x = 2.0;
printf("\n%.1f*%.1f^2 + %.1f*%.1f + %.1f = %.1f\n",a,x, b, x, c, f(a, b, c, x));
system("pause");
return 0;
}
|