/*-------------------------------------------------------------------*/ /* sumstack.c */ /*-------------------------------------------------------------------*/ #include int main(int argc, char *argv[]) { int iFirst; int iSecond; int iSum = 0; int i; printf("Enter an integer: "); scanf("%d", &iFirst); printf("Enter another integer that is greater than the first: "); scanf("%d", &iSecond); for (i = iFirst; i <= iSecond; ++i) iSum += i; printf("The sum of all integers between the two is %d.\n", iSum); return 0; }