在这里插入代码片
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main()
{
//产生一个新数字,求累加和
int num;
printf("请输入一个数:");
scanf("%d", &num);
int sum = num;
int new_num=num;
for (int count = 1; count <5; count++)
{
new_num = new_num * 10 + num;
printf("%d\n", new_num);
sum = sum + new_num;
}
printf("%d\n", sum);
system("pause");
return 0;
}
求a+aa+aaa+aaaa+aaaaa
最新推荐文章于 2022-11-16 11:51:01 发布