编辑代码


#include <stdio.h>
int main () {
    printf("输入x的值:");

    int x;
    scanf("%lf", &x);
    
    if(x < 1){
        printf("y = %lf", x);
    }
    else {
        if (x == 1 || x < 10){
            printf("y = %lf", 2 * x - 1);
        }
        else {
            printf("y = %lf", 3 * x - 11);
        }
    }




return 0;
}