#include<iostream>
using namespace std;


int main ()
{
  // initialize input variables and counting variable
  int min, max, count;
  // initialize sum variable between min and max numbers
  int sum = 0;


  // take inputs from user
  cout << "Provide minimum number: ";
  cin >> min;

  cout << "Provide maximum number: ";
  cin >> max;


  // begin count at minimum value
  count = min;


  // perform summation
  while ( count <= max ) {
     sum += count;
     count++;
  }


  // Output result of sum
  cout << "Sum of numbers between " << min << " and "
       << max << " is " << sum << endl;


  return 0;
}