anybody knows c++ programming?
i took a university class on basic c++. maybe i can help. always best to post question right away rather then ask for future help ^_^
i'm trying to to plot a graph for polynomial equation; here is the program; idk why but i keep getting syntax error on return value. #include<iostream> #include<math.h> using namespace std; double a, b, c, x, y, xs=.1, ys=4; double cy(double x); return a*(x*x)+(b*x)+c; void main(){ cout<<"Enter three coefficent for polynomial function: "; cin>>a>>b>>c; for (int i = 0; i<40; i++) x=xs*i; y=cy(x); cout<<x<<" "<<y<<endl; for(int s = 0; s<y*ys+40; s++) cout <<" "; cout<<"-"<<endl; system("pause"); }
nvm i was able to fix up the return syntax error, but can yall help me plot a curve graph with any polynomial degree. so far i used only two degrees
Join our real-time social learning platform and learn together with your friends!