回复 7 楼 周满悦
虽然没声明,但编译器可以识别,只是结果不对,运行出来只有2个结果
回复 10 楼 wssy213
等待你解决啊 我运行的结果只有28点几和42点几 其他的 比如1和70什么的为什么不输出来??


程序代码:
#include <stdio.h>
#include <conio.h>
#include <math.h>
int main()
{
const double limit = 71.0;
double x, y;
for (x = 0.0; x < limit; x += 0.1)
{
for (y = 0.0; y < limit; y += 0.1)
{
if (fabs((x + y) - limit) < 1e-5)
{
printf_s("%f,%f\n", x, y);
//_getch();
}
}
}
_getch();
return 0;
}
