From 0cc8033f3103513d6122cabfa6b245affcdfb5e6 Mon Sep 17 00:00:00 2001 From: fdai7782 Date: Fri, 2 Feb 2024 15:56:53 +0000 Subject: [PATCH] Added bitwiseOR function for bitwise OR operation --- src/main/c/main_taschenrechner.c | 6 ++++++ src/main/c/taschenrechner.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/main/c/main_taschenrechner.c b/src/main/c/main_taschenrechner.c index e365a95..e0bb699 100644 --- a/src/main/c/main_taschenrechner.c +++ b/src/main/c/main_taschenrechner.c @@ -68,6 +68,12 @@ int bitwiseAND(int num1, int num2) { return num1 & num2; } +// Bitwise OR function +int bitwiseOR(int num1, int num2) { + return num1 | num2; +} + + // scientificmode int scientificMode(){ diff --git a/src/main/c/taschenrechner.h b/src/main/c/taschenrechner.h index 866141a..b3cc747 100644 --- a/src/main/c/taschenrechner.h +++ b/src/main/c/taschenrechner.h @@ -32,6 +32,9 @@ double exponentialFunction(double x); // Bitwise AND function int bitwiseAND(int num1, int num2); +// Bitwise OR function +int bitwiseOR(int num1, int num2); + int mode(int userChoice); int displayMenu();