Skip to content

Instantly share code, notes, and snippets.

@Adals20
Created February 3, 2017 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Adals20/3ee0f7d2ee21b3a8b6d1f1ba8a32af86 to your computer and use it in GitHub Desktop.
Save Adals20/3ee0f7d2ee21b3a8b6d1f1ba8a32af86 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main(){
int limite1, limite2, i, suma = 0;
cout << "Introdusca el numero menor de la serie: ";
cin >> limite1;
i = limite1;
cout << "Introdusca el numero mayor de la serie: ";
cin >> limite2;
while(i<=limite2){
suma = suma + i;
i ++;
}
cout << "La suma es: " << suma << endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment