From 1452d3f6c79d9a71f7eceae7eca4e95f407c5e73 Mon Sep 17 00:00:00 2001 From: fdai7801 Date: Fri, 9 Feb 2024 21:40:53 +0000 Subject: [PATCH] Update BasicMode.c --- src/main/c/BasicMode.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/c/BasicMode.c b/src/main/c/BasicMode.c index a9ea1f8..fa617f9 100644 --- a/src/main/c/BasicMode.c +++ b/src/main/c/BasicMode.c @@ -33,7 +33,7 @@ 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 additionbin(long long int a, long long int b) { long long int dec1, dec2; dec1 = BinToDec(a); dec2 = BinToDec(b); @@ -43,7 +43,7 @@ long long int addition(long long int a, long long int b) { return dec2; } // multiplication -long long int multiplication(long long int a, long long int b) { +long long int multiplicationbin(long long int a, long long int b) { long long int dec1, dec2; dec1 = BinToDec(a); dec2 = BinToDec(b); @@ -53,7 +53,7 @@ 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 subtractionbin(long long int a, long long int b) { long long int dec1, dec2; dec1 = BinToDec(a); dec2 = BinToDec(b); @@ -99,7 +99,7 @@ int main() { scanf("%lld", &bin1); printf("enter the second binary number: "); scanf("%lld", &bin2); - result = addition(bin1, bin2); + result = additionbin(bin1, bin2); printf("%lld+%d = %lld\n", bin1, bin2, result); break; @@ -108,7 +108,7 @@ int main() { scanf("%lld", &bin1); printf("enter the second binary number: "); scanf("%lld", &bin2); - result = subtraction(bin1, bin2); + result = subtractionbin(bin1, bin2); printf("%lld-%lld = %lld\n", bin1, bin2, result); break; @@ -117,7 +117,7 @@ int main() { scanf("%lld", &bin1); printf("enter the second binary number: "); scanf("%lld", &bin2); - result = multiplication(bin1, bin2); + result = multiplicationbin(bin1, bin2); printf("%lld*%d = %lld\n", bin1, bin2, result); break;