#include<stdio.h>
int main()
{
int n,i;
double x,y;
printf("Enter n:");
scanf("%d",&
n);
for(i=
1;i<=n;i++
){
printf("Enter x:");
scanf("%lf",&
x);
if(x<=
0)
printf("输入错误,请重新输入\n");
else if(x<=
50){
y=
0.53*
x;
}
else{
y=
26.5+
0.58*(x-
50);
}
printf("y=%.3f\n",y);
}
return 0;
}
转载于:https://www.cnblogs.com/liruijia199531/p/3378405.html
相关资源:数据结构—成绩单生成器
转载请注明原文地址: https://win8.8miu.com/read-1558792.html