c5-2.c 129 B

123456789101112
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int i=1,sum=0;
  5. do
  6. {
  7. sum=sum+i;
  8. i++;
  9. }while(i<=100);
  10. printf("%d\n",sum);
  11. return 0;
  12. }