summaryrefslogtreecommitdiff
path: root/number.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'number.cpp')
-rw-r--r--number.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/number.cpp b/number.cpp
index 57dbcae..fcc6dc0 100644
--- a/number.cpp
+++ b/number.cpp
@@ -92,6 +92,18 @@ number::operator+(const number &n) const
return result;
}
+number
+number::operator*(const number &n) const
+{
+ number result;
+
+ for (number i; i < n; ++i) {
+ result += *this;
+ }
+
+ return result;
+}
+
/* }}} */
/* Comparison operators {{{ */