seminar02 fixed zero multiply issue

This commit is contained in:
nihonium 2022-11-03 20:50:14 +03:00
parent 094a022df8
commit 5165d16ffa
Signed by: nihonium
GPG key ID: 0251623741027CFC

View file

@ -151,6 +151,8 @@ Number Number::operator*(const Number & right) const
size << ")" << " " << "arg2=" << right << "(capacity=" << right.
capacity << ",size=" << right.size << ")" << std::endl;
#endif
if (*this == Number("0") || right == Number("0"))
return Number("0");
int i, j;
int temp;
Number result;