C语言两倒题目,请尽量精简语句.

来源:学生作业帮助网 编辑:作业帮 时间:2024/10/07 01:11:23
C语言两倒题目,请尽量精简语句.
xn@@WPmN%TX P<6UbY;Z63% Ə4*H̝;g:V_V~|\^}x|1\]~_|y|b.'5smW< 1.qW<{>.9wFFHdQZbA*I'ګHPj/yAgyi8IƜ.uOHu b#Q-]F.7eajZnL\,rq..6h1u6ML?4OIuEK{["!2W41_O#8(3@oNiY`B[ 0 z#}9G0"Q0SCt^_m!9tBr ~Y.YtS%WP@eAok}ѦqsEoIs^H"C^M$ٴ2b >ڡ 8@Jz@XgnUlbaalP##{-߇;W_Ѵ"IFz

C语言两倒题目,请尽量精简语句.
C语言两倒题目,请尽量精简语句.

C语言两倒题目,请尽量精简语句.
1、
#include
double f(double x)
{
if (x < 1)
return x;
else if (x < 10)
return 3 - x / 5;
else
return 3 * x - 11;
}
int main()
{
double x[3] = {0.5, 5, 50};
int i;
for (i = 0; i < 3; i++)
printf("f(%.2lf) = %.2lf\n", x[i], f(x[i]));
return 0;
}
2、
#include
int main()
{
int score;
char level;
printf("Input the score: ");
scanf("%d", &score);
if (score == 100) level = 'A';
else if (score < 60) level = 'E';
else level = 'A' + 9 - score / 10;
printf("Level: %c\n", level);
return 0;
}