C语言求1到100和的循环怎么写?

C语言求1到100的和以下是几种用C语言计算1到100之和的方法:方法1:使用for循环#include<stdio.h>intmain(){intsum=0;for(inti=1;i<=100;i++){sum+=i;}printf("1……

目录[+]