!Given values for a,b,c and d and a set of values for the variable x evaluate the function defiend by !f(x)=a*x**2+b*x+c if=x<d !f(x)=0 ifx=d !f(x)=-a*x**2+b*x-c if x>d program function_x implicit none real::f_x,x,a,b,c,d print*,"Input a,b,c,d" read*,a,b,c,d,x print*,"a=",a,"b=",b,"c=",c,"d=",d,"x=",x if(x<d)then f_x=a*(x**2)+b*x+c else if (x==d)then f_x=0 else if(f_x>d)then f_x=-a*(x**2)+b*x-c endif endif print*,"f(x)=",f_x end program function_x