#define N 5
#include <stdio.h>
int main(){
int t = 0, s = 0 , i;
for (i = 1; i <= N; i++) {
t = i + t * 10 ;
s += t;
}
printf("s=%d\n", s);
return 0;
}
计算s=1+12+123+1234+12345 C语言
最新推荐文章于 2024-07-23 18:05:21 发布