int i,j,t,k=0; for (i=1,j=100;i<=j;k=k+i+j,i++,j--) { printf("%d\n",k); t=k; } printf("总和=%d",t);
int i,j,t,k=0; for (i=1,j=100;k=k+i+j,i<=j;i++,j--) t=k; printf("总和=%d",t);
#include <stdio.h> void main( ) { int i,j,t,k=0; for (i=1,j=100;i<=j;i++,j--) k=k+i+j; t=k; printf("总和=%d",t); }