Created
February 3, 2017 02:35
-
-
Save Adals20/3ee0f7d2ee21b3a8b6d1f1ba8a32af86 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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