Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of Lab_6_WaG by
Diff: main.cpp
- Revision:
- 3:293ff9cb705d
- Parent:
- 2:b444464ebe67
- Child:
- 4:0ed77d8b3e42
--- a/main.cpp Tue Feb 20 17:24:19 2018 +0000
+++ b/main.cpp Wed Feb 21 19:03:43 2018 +0000
@@ -121,6 +121,24 @@
return result;
}
+int mod_bcd(int num) {
+ int bcd_arr[4];
+ int place = 4;
+ int bcd = 0;
+ int mult = 1;
+ while (num != 0) {
+ int val = num % 10;
+ bcd_arr[place] = val;
+ num = num/10;
+ }
+ for (int i = 1; i < 5; i++) {
+ bcd = bcd + bcd_arr[i]*mult;
+ mult = mult * 10;
+ }
+ return bcd;
+}
+
+
char to_command(char input, int place) {
}
