1 #include<iostream>
 2 using namespace std;
 3 int main()
 4 {
 5     int m,a,b,sum;
 6     char ch[50];
 7     while(cin>>m>>a>>b,m)
 8     {
 9        sum=a+b;
10        itoa(sum,ch,m); // 把一整数转换为字符串,即将sum转换为m进制数,,返回到ch字符串 
11        cout<<ch<<endl;
12     }
13 return 0;
14 }
15     

相关文章:

  • 2022-12-23
  • 2021-09-04
  • 2021-11-13
  • 2021-04-15
  • 2021-08-03
  • 2021-05-17
  • 2021-09-01
  • 2021-11-07
猜你喜欢
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
  • 2022-12-23
  • 2021-10-27
  • 2021-07-22
  • 2022-12-23
相关资源
相似解决方案