Browse Source

Update BasicMode.c

remotes/origin/develop
fdai7801 11 months ago
parent
commit
eb359e3cca
  1. 12
      src/main/c/BasicMode.c

12
src/main/c/BasicMode.c

@ -2,7 +2,7 @@
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include "BasicMode"
#include "BasicMode.h"
// convert decimal to binary
@ -42,6 +42,16 @@ 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 dec1, dec2;
dec1 = BinToDec(a);
dec2 = BinToDec(b);
dec1 = dec1 * dec2;
dec2 = DecToBin(dec1);
return dec2;
}
int main() {

Loading…
Cancel
Save