求助大佬,要求求一个分段函数的值,程序哪错了,纯新人
#include <stdio.h>int main()
{
int x;
printf("intput 'x'num\n");
scanf_s("%d",&x);
if (x < 1) {
printf("x的值为:\n",x);}
x = 2 * x - 1;
if (1 <= x < 10) {
printf("x的值为:\n",2*x-1); }
x = 3 * x - 11;
if (x >= 10) {
printf("x的值为:\n", 3 * x - 11); }
return 0;
}
[此贴子已经被作者于2022-10-4 22:44编辑过]