X-Git-Url: https://git.llucax.com/z.facultad/75.29/dale.git/blobdiff_plain/fd08b581ae86ad918c68140a68849b37b1b3b2e4..7153d675e97a60c4a4d9a31802b91df7f70e10f9:/src/main.cpp diff --git a/src/main.cpp b/src/main.cpp index c573549..3148ce2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -43,17 +43,17 @@ void procesar(istream& is, ostream& os) { istringstream iss(linea.c_str()); char operador; - string str_op1, str_operador, str_op2; + string str_op1, str_op2; iss >> str_op1 >> operador >> str_op2; number<> op1 = str_op1; number<> op2 = str_op2; switch (operador) { case '+': - os << op1 + op2 << "\n"; + os << (op1 += op2) << "\n"; break; case '-': - os << op1 - op2 << "\n"; + os << (op1 -= op2) << "\n"; break; case '*': os << naif(op1, op2) << "\n";