PROGRAM IN C++ FOR A FUNCTION: f(x)=(x*x + 1.5x+5)/(x-3) for x=-10 to 10 , x should have the values from -10,-8,-6,..........10.
#include<iostream.h>
#include<conio.h>
void main()
{
int x ;
float fx;
for(x=-10;x<=10;x=x+2)
{
fx=(x*x+1.5*x+5)/(x-3);
cout<<"For x="<<x;
cout<<"f(x) is"<<fx<<"\n";
}
return();
}
Comments
Post a Comment