Last active
September 3, 2019 03:41
-
-
Save parzibyte/2448bbf8a3123d014ee59f5feca2aaa1 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() { | |
string entrada = ""; | |
int sumatoria = 0, numero = 0; | |
while (true) { | |
cout << "Escribe un numero o '=' para ver la suma:\n"; | |
cin >> entrada; | |
if (entrada == "=") break; | |
sumatoria += stoi(entrada); | |
} | |
cout << "La suma es " << sumatoria; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment