From 53fce56ca795958295c0810927f356d844fb9eeb Mon Sep 17 00:00:00 2001 From: fdai7930 Date: Wed, 7 Feb 2024 23:20:39 +0100 Subject: [PATCH] multiplication left shift --- src/multiplication.c | 3 +++ src/multiplication.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/multiplication.c b/src/multiplication.c index d9cca83..1b3717e 100644 --- a/src/multiplication.c +++ b/src/multiplication.c @@ -14,6 +14,9 @@ int multiply_three_integers(int a, int b, int c) { return a * b * c; } +int multiply_left_shift(int a, int b) { + return a << b; +} diff --git a/src/multiplication.h b/src/multiplication.h index 441d28a..c4fdd6b 100644 --- a/src/multiplication.h +++ b/src/multiplication.h @@ -3,5 +3,7 @@ extern double multi(double ein1, double ein2); double square(double x); int multiply_three_integers(int a, int b, int c); +int multiply_left_shift(int a, int b); + #endif // MULTIPLICATION_H