#F0001P1241. 循环阅读程序1
循环阅读程序1
阅读如下程序,提交它的输出结果(请不要提交代码。请只提交阿拉伯数字或字符串的输出结果)。
#include <bits/stdc++.h>
using namespace std;
int main() {
int a = 1;
for (int i = 1; i <= 3; i++) {
a += i;
if (a % 2 == 0) {
a /= 2;
} else {
a = a * 2 + 1;
}
printf("i: %d, a: %d\n", i, a); // 相当于cout << "i: " << i << ", a: " << a << endl;
}
cout << a;
return 0;
}
相关
在以下作业中: