1、
#include <stdio.h> int main(void) { int a,b; puts("please input two integers."); printf("a = "), scanf("%d", &a); printf("b = "), scanf("%d", &b); int sum = 0; do { sum = sum + b; b = b + 1; } while (b <= a ); printf("sum = %d.\n", sum); return 0; }