Evaluate a Quadratic Polynomial
Given real values \(a,b,c,x\), evaluate \(f(x)=ax^2+bx+c\).
Input
Four lines contain \(a,b,c,x\), in that order.
Output
Print Nhap a = Nhap b = Nhap c = Nhap x = f(x) = a*x^2 + b*x + c = value, replacing each variable name in the expression by its input value. Format real values with at most six significant digits and no unnecessary trailing zeros.
Example
Input
3
4
9
2
Output
Nhap a = Nhap b = Nhap c = Nhap x = f(2) = 3*2^2 + 4*2 + 9 = 29
Comments