本题使用枚举,以下是本题使用枚举,以下是C++代码:++代码:

#include<bits/stdc++.h>
using namespace std;
int main(){
    for (int tf=1;tf<5;tf++){
        bool a=(tf!=1);
        bool b=(tf==3);
        bool c=(tf==4);
        bool d=(tf!=4);
        if (a+b+c+d==3){
            cout<<"小偷是:"<<char('A'+tf-1);
        }
    }
    return 0;
}```

0 条评论

目前还没有评论...

信息

ID
141
时间
ms
内存
MiB
难度
10
标签
递交数
5
已通过
3
上传者