【发布时间】:2019-06-08 09:15:51
【问题描述】:
#include <stdio.h>
#include <stdlib.h>
#define f(x) (1 / (x*x+1))
int main(){
double a,b,h,x,y;
printf("Enter a, b, h: ");
scanf(" %lf %lf %lf " , &a, &b, &h);
// I ask for 3 inputs but the programm needs 4 to run...why is that?
x = a;
while(x<b)
{
y = f(x);
printf("%lf %lf \n", x ,y );
x +=h;
}
system("Pause");
return(0);
}
【问题讨论】:
-
你的问题在哪里?
-
@EdChum 在标题中。
-
@LightnessRacesinOrbit 我更喜欢亲自提出问题
-
@EdChum 这是性别歧视!
-
Seems to work okay。你没有按
来提交来自终端的输入吗?请提供有关如何重现您的问题的更多信息。