脑子不够用了,-100求助。
查看原帖
脑子不够用了,-100求助。
1413309
makeway楼主2024/8/5 15:28

**```cpp 代码:#include <bits/stdc++.h> using namespace std; int main() { long long int n; cin >> n; while (n != 1) { if (n % 2 == 0){ cout << n << "/2=" << n / 2 << endl; n = n / 2;} else {cout << n << "*3+1=" << n * 3 + 1 << endl; n = n * 3 ;}} else cout << "End" << endl; return 0; }

**
2024/8/5 15:28
加载中...