0
已解决
李牧晓
中级天翼
中级天翼
#include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
int main()
{
long long n,cnt=0,m=3,k=1,s=2;
cin>>n;
while(n!=1){
if(n%2!=0){
int ans=n*m+k;
printf("%d*%d+%d=%d\n",n,m,k,ans);
n=ans;
}
else{
int ans=n/s;
printf("%d%d=%d\n",n,s,ans);
n=ans;
}
}
cout<<"End";
return 0;
}
哪错了?
急