From 1afe231b7c153546387c9a30a03ff9e6960cfeff Mon Sep 17 00:00:00 2001 From: fdai7930 Date: Wed, 7 Feb 2024 23:33:38 +0100 Subject: [PATCH] multiplication by ten --- src/multiplication.c | 3 +++ src/multiplication.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/multiplication.c b/src/multiplication.c index 58f1e8e..bf381f4 100644 --- a/src/multiplication.c +++ b/src/multiplication.c @@ -20,6 +20,9 @@ int multiply_left_shift(int a, int b) { int multiply_right_shift(int a, int b) { return a >> b; } +int multiply_by_ten(int a) { + return a * 10; +} diff --git a/src/multiplication.h b/src/multiplication.h index 0a77b5a..5d0b41c 100644 --- a/src/multiplication.h +++ b/src/multiplication.h @@ -5,6 +5,6 @@ double square(double x); int multiply_three_integers(int a, int b, int c); int multiply_left_shift(int a, int b); int multiply_right_shift(int a, int b); - +int multiply_by_ten(int a); #endif // MULTIPLICATION_H