From 11f31fd5e200fac89bbe8953f09a11022c647797 Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:37:29 +0100 Subject: [PATCH] kabrel --- src/main/c/BasicMode.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index 0b1bc48..d11cb42 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -2,7 +2,7 @@ #include #include #include -#include +#include "BasicMode.h" // convert decimal to binary @@ -32,3 +32,18 @@ long long int BinToDec(long long int n) { return dec; } +//addition +long long int addition(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() { + + return 0; +}