Tweaked the error message a bit

This commit is contained in:
2026-04-02 01:11:13 +03:00
parent 000629b937
commit 110a292529
+5 -4
View File
@@ -23,7 +23,7 @@ int BaseCalculator::calculate(const Operation& op)
case OpType::Division:
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;
}
else
@@ -31,12 +31,13 @@ int BaseCalculator::calculate(const Operation& op)
break;
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 = op.a % op.b;
else
result = op.a % op.b;
break;
case OpType::Special: