组合题6 个小题
已作答 0 / 6
1#include <iostream>2using namespace std;3int main() {4 int n;5 cin >> n;6 int x = 1, y = 1;7 while (n > 0) {8 if (n % 2 == 0) {9 ++x;10 } else {11 ++x;12 ++y;13 }14 n = n / 2;15 }16 cout << x << ' ' << y << endl;17 return 0;18}以下问题均假定输入的 n 为不超过 231−1 的非负整数。
将第 11 行的 ++x; 删除后,程序输出的两个数一定相等。( )