为什么结果一直是零
#include<stdio.h>int main()
{
int x;
double y;
printf("请输入整数x;\n");
scanf_s("%d", &x);
y = (1 + x * x) / (x*x + 4 * sqrt(x) + 10);
printf("y的值为:%lf\n", y);
getchar();
getchar();
}
#include <stdio.h> #include <math.h> int main(int argc, char *argv[]) { int x; double y; x = 10; y = (1 + x * x) / (x*x + 4 * sqrt(x) + 10); printf("y的值为:%lf\n", y); return 0; }