#include <stdio.h>
/*
计算1+2+....+100
soulsjie 20170525
*/
void main(){
	int i;
	int s=0;
	for(i=0;i<=100;i++)
	{
		s+=i;
	}
	printf("1-100之和是:%d\n",s);
}

 计算1+2+...+100之和<for循环的学习>

 

相关文章:

  • 2022-12-23
  • 2021-12-25
  • 2022-12-23
  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
  • 2021-08-31
  • 2021-12-13
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案