先输入数据 两个两个的输,中间用空格隔开,比如
please input data1: 11 11.08然后回车
依次输入完五组数据
完了你想查某个温度的溶解度,他要求你输入温度你输入11.5
它就输出对应的溶解度,然后他提示你是否继续查溶解度,是就输入y,想结束程序
就输入n.
#include
#include
#define NUMBER 5
typedef struct
{
double x;
double y;
}Point;
double * parabola(Point*, Point*, Point*);
double calculate(double* , double );
int main()
{
double x = 0, y = 0;
double* f = NULL;
int i = 0, n = 0;//n为要插的中间那个点的位置
char c = 'y';
Point p[NUMBER];
for(i = 0; i < NUMBER; i++)
{
printf("Please input the point%d:", i+1);
scanf("%lf%lf", &p[i].x, &p[i].y);
while(10 != getchar())
{
continue;
}
}
whi