This one was a little bit tricky but it wasn’t really difficult.

#include <iostream>
using namespace std;
int main (){
int x;
int y;
int z = 0;
cout << “Suma de los numeros entre 2 numeros” << endl;
cout << “Put the first number”;
cin >> x;
cout << “Put the second number”;
cin >> y;
while (x<=y-1){
(z=z+x);
(x=x+1);}
cout << “Total= ” << (z+x);
return 0;
}

This is the program.

Dog portrait 2

https://www.flickr.com/photos/tambako/

CC BY 4.0 #WSQ07 by alan46bc is licensed under a Creative Commons Attribution 4.0 International License.