diff --git a/cnumber.hpp b/cnumber.hpp index 51a2f3e..f8cd7d8 100644 --- a/cnumber.hpp +++ b/cnumber.hpp @@ -76,6 +76,9 @@ public: } os << 'i'; } + if (z.r == 0 && z.i == 0) { + os << '0'; + } return os; } void operator=(const cnumber &z) {