WSQ04, the most challenging task so far (just kidding, they are all pretty easy. Even more if you have a friend’s help). Anyway, I’ll upload the video later, so you can see the whole process.

## Code:

#include <iostream>

using namespace std;

int main()

{

int n1, n2, dif, sum, sum2, count=0, cicle;

cout<<endl;

cout<<“Give me two numbers and I’ll calculate the sum of the integer in that range.”<<endl;

cout<<endl;

cout<<“Please introduce the first number (the lower bound):”<<endl;

cin>>n1;

cout<<“Please introduce the second number (the upper bound):”<<endl;

cin>>n2;

dif=n2-n1;

cicle=dif;

sum=n1;

sum2=sum+1;

do

{

sum=sum+sum2;

sum2++;

count++;

}

while(cicle>count);

cout<<“The sum of the integers in that range is “<<sum<<“.”<<endl;

return 0;

}

Here’s the code working: