15 lines
127 B
C
15 lines
127 B
C
|
#include<stdio.h>
|
||
|
|
||
|
int main(){
|
||
|
int sum=0,a=0;
|
||
|
|
||
|
do{
|
||
|
sum+=a;
|
||
|
a++;
|
||
|
}while(a<=1000);
|
||
|
|
||
|
printf("sum=%d",sum);
|
||
|
|
||
|
return 0;
|
||
|
}
|