小白想请教一下这个代码错哪了?
问题描述:
#include <stdio.h>
#include <math.h>
int main()
{
double x,y;
scanf("%.2lf\n",&x);
y=5xx+6*x+10;
printf ("%.2lf\n",y);
return 0;
}
答
修改后如下:
#include <stdio.h>
// #include <math.h>
int main()
{
double x, y;
scanf("%lf", &x);
// printf("%.2f\n", x);
y = 5 * x * x + 6 * x + 10;
printf("%.2lf\n", y);
return 0;
}