Decimal multiply(const Decimal& another){ Decimal product; product.length=length+another.length-1; product.scale=scale+another.scale; for(int i=0;i<length;i++) for(int j=0;j<another.length;j++) product.digits[i+j]+=digits[i]*another.digits[j]; product.normalize(); return product; }