文章详情
时间:2010-07-27 来源:chengxiaopeng
#include <stdio.h> int main(int argc,int *argv[]) { int a,n; int i,temp,result; printf("please input a,n:"); scanf("%d,%d",&a,&n); temp = 0; result = 0; for(i = 0 ; i < n; i++) { temp = temp * 10 + a; result += temp; if (i == n - 1) { printf(" %d ",temp); } else { printf("%d + ",temp); } } printf(" = %d",result); system("pause"); return 0; }
辰域智控app
网医联盟app
汇丰汇选App
1970-01-01