// 测试双分支结构 #include using namespace std; int main() { cout << "请输入一个数: "; int n; cin >> n; if (n % 2 == 0) cout << n << "是偶数" << endl; else cout << n << "是奇数" << endl; return 0; }