这是我在 Visual C++ 上的问答游戏的代码
if (this->answer->Text == "2"){
this->question->Text = "2+2?";
}
else if (this->answer->Text == "4"){
this->question->Text = "3+3?";
}
else if (this->answer->Text == "6"){
this->question->Text = "4+4?";
}
else if (this->answer->Text == "8"){
this->question->Text = "Finished!";
}
else {
MessageBox::Show("Wrong!!");
}
有什么可以缩短此代码吗?考虑使用数组?