From 0ffb228ff2f8c798a0da7a449c6f59586f29fe6c Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:04:54 +0000 Subject: [PATCH] kabrel --- src/main/c/BasicMode.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index da2431d..7cab631 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -52,6 +52,17 @@ long long int multiplication(long long int a, long long int b) { return dec2; } +//subtraction +long long int subtraction(long long int a, long long int b) { + long long int dec1, dec2; + dec1 = BinToDec(a); + dec2 = BinToDec(b); + dec1 = dec1 - dec2; + dec2 = DecToBin(dec1); + + return dec2; +} + int main() {