From a1c05e422a160de991740365e7f551c7d887121c Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Fri, 16 Mar 2018 18:03:32 +0100 Subject: [PATCH] MP_02 start --- 02_MENT/a.out | Bin 0 -> 15336 bytes 02_MENT/build.sh | 11 +++++++++-- 02_MENT/limits.out | Bin 0 -> 27728 bytes 02_MENT/main_02_MENT.cpp | 24 ++++++++++++++++++------ 02_MENT/println.out | Bin 0 -> 20336 bytes 5 files changed, 27 insertions(+), 8 deletions(-) create mode 100755 02_MENT/a.out mode change 100644 => 100755 02_MENT/build.sh create mode 100755 02_MENT/limits.out create mode 100755 02_MENT/println.out diff --git a/02_MENT/a.out b/02_MENT/a.out new file mode 100755 index 0000000000000000000000000000000000000000..aacdc593e4dfaae8eb2d24680ea93806eb9e523a GIT binary patch literal 15336 zcmeHOeQ;aVmA{tq;Sk4mK1d7%qO`y!g(#BkIHo|6V=Fu_PH5ctJwlj=Hv135`tzYXHV@B8xY{J61~W+u2~vHz z(8Dtl9x=&GLMit}$dR4DZ>klHJ4Aiu`emK4 zUqb3fN*lwW-loQl;l2&wP$V(DVYs-H@mN*saQjz(wBGwt2g#L7KZWvTB?>P=#ii)6GW1JeK`H)k zmeIerjGk-C@CVEAuYv8Q>V3Qn{rhF?OqJoktqlJ?W$c_N!#`R^e@B^iT~S8=zB2se zHx4|7=@%eS|G26=c||qQvy|1b8HbP4O%Gyhk*K#;tYcE>TcTZ^1#|{~j%$5^Ypx+5 zZept1KNyXuam^poRF$b;>e9mT_CS~Bb_WLhF;$ECLmCL)EyL*5YBa9J zg8sqwZnfK`db>8OJ8s$DrEON#!0@o!?XEYuz!Zw~w|6zFU7OTyx9atxj_qC1aNHZ> zIa1r^_U<9%7K{9Kxmut=)K%851~70PU0P!>(ibk(f{!u2iCSLX`m)uwy1loeX%{Tq zc}rl&EnN*lL31b?SJCWXV|yf|$xh*Y)wy*?SF}r|&MP-SAKN?{Hnl6L4aI_iP&^ck z(7+E5t3$z9JR0$bL)u<-kB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(s47$2&M~xU%{M!EdJukoF z*XQ-RzP6t(|8W|>{(p1y|EI&>)|)Baet(h1uiqORzEW|eHJDbk{yLq%A|M!t)h{v< z$`6#ZjQ$@6fu`o%WYX_N=>MN5-QK!=4gU^2_=?8m*YDXn{PhNst|v>Wvc|s(0_UD? zU%%I;|NkTH7`hvpPwO=aUd|tve|6!YjGw_ zo1%iFxmq#~s19(Q*^H0ww~jybFIRWTBK}U^A`4gQFPIcfx2vlbBa@B)yf#@QFO4Cs GX#GDIQ>1zT literal 0 HcmV?d00001 diff --git a/02_MENT/main_02_MENT.cpp b/02_MENT/main_02_MENT.cpp index caa166f..faf6262 100644 --- a/02_MENT/main_02_MENT.cpp +++ b/02_MENT/main_02_MENT.cpp @@ -1,31 +1,43 @@ // file: main_02_MENT.cpp // THIS IS C++, use clang++ -#include "../helpers/println.hpp" #include +#include "../helpers/println.hpp" + struct PascalString{ int length; // number of chars used char characters[256]; // chars of some character string }; -int hexDigitToInt(char hexDigit){ -int value = -1; -// TBD +int hexDigitToInt(char hexDigit) { +int value = 0; + +if(hexDigit > 47 && hexDigit < 58) + value = hexDigit - 48; + +if(hexDigit > 96 && hexDigit < 103) + value = hexDigit - 97 + 10; + return value; } -int hexStringToInt(PascalString binaryDigits){ +int hexStringToInt(PascalString binaryDigits) { int returnValue = -1; return returnValue; } -int main(int argc, char** argv, char** envp){ +int main(int argc, char** argv, char** envp) { PascalString s = {3, '1', '0', '0'}; PascalString s2 = {4, 'f', 'f', 'f', 'f'}; println(hexStringToInt(s)); println(hexStringToInt(s2)); + + + println(hexDigitToInt('D')); + println(hexDigitToInt('9')); + println(hexDigitToInt('2')); return 0; } diff --git a/02_MENT/println.out b/02_MENT/println.out new file mode 100755 index 0000000000000000000000000000000000000000..82e5fb3ca01b4de92080412860fbf3999c71a474 GIT binary patch literal 20336 zcmeHPe{ft!eP8M1SdMM|u#;GrkR15|HnGolvMeir$&;*eo)XCsmK6-ed3U}$Th~Z; zLif&*L*ytp4t;YG)zCB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