1 条题解

  • 0
    @ 2025-11-29 12:35:42

    C :

    #include "stdio.h"
    #include "math.h"
    int main() {
        int x;
        printf("Input x:\n");
        scanf("%d", &x);
        x = fabs(x);
        int a, b, c;
        // 取下个位数
        a = x % 10;
        x = x / 10;
        
        // 取下十位数
        b = x % 10;
        x = x / 10;
        
        // 取百位数
        c = x;
        printf("y=%d\n", a * 100 + b * 10 + c);
        return 0;
    }
    
    • 1

    信息

    ID
    67
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者