#include <iostream>
using std::cout;
using std::endl;
using std::cin;
int main()
{
int numb1, numb2;
cout << "Type the two bounding integers: ";
cin >> numb1 >> numb2;
int total = 0;
for(int i = numb1; i <= numb2; i += 2)
{
total += i;
}
cout << endl << "Total: " << total << endl;
if (numb1 % 2 == 1) cout << "The total is not correct. Why? How can it be fixed?" << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgc3RkOjpjb3V0Owp1c2luZyBzdGQ6OmVuZGw7CnVzaW5nIHN0ZDo6Y2luOwoKaW50IG1haW4oKQp7CiAgICBpbnQgbnVtYjEsIG51bWIyOwogICAgY291dCA8PCAiVHlwZSB0aGUgdHdvIGJvdW5kaW5nIGludGVnZXJzOiAiOwogICAgY2luID4+IG51bWIxID4+IG51bWIyOwogICAgaW50IHRvdGFsID0gMDsKICAgIGZvcihpbnQgaSA9IG51bWIxOyBpIDw9IG51bWIyOyBpICs9IDIpCiAgICB7CiAgICAgICAgdG90YWwgKz0gaTsKICAgIH0KICAgIGNvdXQgPDwgZW5kbCA8PCAiVG90YWw6ICAiIDw8IHRvdGFsIDw8IGVuZGw7CiAgICBpZiAobnVtYjEgJSAyID09IDEpIGNvdXQgPDwgIlRoZSB0b3RhbCBpcyBub3QgY29ycmVjdC4gIFdoeT8gIEhvdyBjYW4gaXQgYmUgZml4ZWQ/IiA8PCBlbmRsOwogICAgcmV0dXJuIDA7Cn0=