Tweaked the error message a bit

This commit is contained in:
2026-04-02 01:11:13 +03:00
parent 000629b937
commit 110a292529
+3 -2
View File
@@ -23,7 +23,7 @@ int BaseCalculator::calculate(const Operation& op)
case OpType::Division: case OpType::Division:
if (op.b == 0) if (op.b == 0)
{ {
std::cerr << "Invalid operation requested! Resetting the accumulator to 0"; std::cerr << "Invalid operation requested! Resetting the accumulator to 0\n";
result = 0; result = 0;
} }
else else
@@ -33,9 +33,10 @@ int BaseCalculator::calculate(const Operation& op)
case OpType::Modulo: case OpType::Modulo:
if (op.b == 0) if (op.b == 0)
{ {
std::cerr << "Invalid operation requested! Resetting the accumulator to 0"; std::cerr << "Invalid operation requested! Resetting the accumulator to 0\n";
result = 0; result = 0;
} }
else
result = op.a % op.b; result = op.a % op.b;
break; break;