新鲜出炉的体节来辣
2024-08-27 21:17:08
发布于:北京
12阅读
0回复
0点赞
你被骗了(bushi)
#include <bits/stdc++.h>
using namespace std;
int n;
int main(){
cin >> n;
int t = n;
while(n != 1){
if(n % 2 == 1){
t = n * 3 + 1;
cout << n << "*" << "3" << "+" << "1" << "=" << t << endl;
n = t;
}else{
t /= 2;
cout << t * 2 << "/" << "2" << "=" << t << endl;
n = t;
}
}
cout << "End" << endl;
return 0;
}
这里空空如也
有帮助,赞一个