编号 题目 状态 分数 总时间 内存 代码 / 答案文件 提交者 提交时间
#3616 #1007. 这你也敢信? Compile Error 0 0 ms 0 K C / 475 B Victorzz 2023-11-25 15:56:46
显示原始代码
#include <stdio.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
    int n;
    scanf("%d", &n);
    int y = n % 2;
    switch (y) {
        case 0:
            printf("YES");
            break;
        case 1:
            int x = n % 3;
            switch (x) {
                case 0:
                    printf("YES");
                    break;
                case 1:
                    printf("NO");
                    break;
                case 2:
                    printf("NO");
                    break;
            }
            break;
    }
    return 0;
}

编译信息

/sandbox/1/a.c:15:8: error: expected expression
                            int x=n%3;
                            ^
/sandbox/1/a.c:16:10: error: use of undeclared identifier 'x'
                switch(x)
                       ^
2 errors generated.