#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
float f(float x)
{
float y;
y=x*x*x -2*x*x +x -3;
return y;
};
int main(int argc, char *argv[]) {
float x;
for(x=-2.0;x<=2.1;x=x+0.1)
printf("x=%f y=%f \n",x,f(x));
return 0;
}
绘制代码增加?