#include<stdio.h>
#include<iostream>
#include<string>
#include<algorithm>
int num[15];
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
int a, b, sum;
cin >> a >> b;
sum = a + b;
if (sum < 0)
sum = -sum;
int len = 0;
while (sum)
{
num[len++] = sum % 10;
sum /= 10;
}
for (int k = len - 1; k>= 0; k--)
{
printf("%d", num[k]);
if (k > 0 && k % 3 == 0)
printf(",");
}
return 0;
}
A1001
最新推荐文章于 2020-06-25 21:37:41 发布