#include <stdio.h>
int main(int argc, const char *argv[])
{
int i, count, num, sum;
printf("plz input ur number and number of loop;\n");
scanf("%d%d", &num, &count);
int tem = num;
sum = num;
for (i = 1; i < count; i++) {
num *= 10;
num += tem;
sum += num;
}
printf("%d\n", sum);
return 0;
}
叠加数字a+aa+aaa+...
最新推荐文章于 2022-04-14 22:38:06 发布