C语言程序:计算二次函数表达式 y = 2x^2 - 3x + 1
#include <stdio.h>
int main() { double x, y;
printf('请输入x的值:');
scanf('%lf', &x);
y = 2 * x * x - 3 * x + 1;
printf('y的表达式为:2x^2 - 3x + 1\n');
printf('当x = %.2lf 时,y = %.2lf\n', x, y);
return 0;
}
原文地址: http://www.cveoy.top/t/topic/mJIw 著作权归作者所有。请勿转载和采集!