switch做法
2024-03-10 21:54:20
发布于:广东
16阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int main(){
int a,b,x,y;
cin >> a >> b >> x >> y;
switch(a+b+x+y){
case 0:
cout << "0";
break;
case 1:
cout << "1";
break;
case 2:
cout << "2";
break;
case 3:
cout << "1";
break;
case 4:
cout << "0";
break;
}
}
这里空空如也
有帮助,赞一个