switch
選我正解
#include <iostream>
using namespace std;
int main() {
int input = 3;
switch (input) {
case 1:
case 3:
case 5:
{
cout << "Part 1" << endl;
break;
}
case 2:
case 4:
case 6:
{
cout << "Part 2" << endl;
break;
}
}
return 0;
}