C-study/04-1/1/1.c

15 lines
127 B
C
Raw Normal View History

2021-11-04 16:59:48 +00:00
#include<stdio.h>
int main(){
int sum=0,a=0;
do{
sum+=a;
a++;
}while(a<=1000);
printf("sum=%d",sum);
return 0;
}