From fc2c35654bd5a61dd60ead6bc34b2399b482d8d1 Mon Sep 17 00:00:00 2001 From: Igor Dzuro Date: Thu, 2 Apr 2020 23:47:27 +0200 Subject: [PATCH] brcc --- du4/program | Bin 17064 -> 17064 bytes du4/program.c | 12 ++++++++++++ 2 files changed, 12 insertions(+) diff --git a/du4/program b/du4/program index a63b52e49e7260e1828c535543e51a72e02e6245..bc664efc182b96a7bea0a860a7e733354794ef46 100755 GIT binary patch delta 866 zcmY*WT}V@582-L*qMOdn{?4#c=OWCOxrDYUYAQKAflwfoSz$jUbrW7}QlhBM8KYL= zhpF9o5tw5#zrGw;$d z&HI8X0)eL^j$ADB*gOAQ6q(SJFD&>K2=z?4(#NIR(F26u*IIJwf%Gh4;0-b_985td zp&*1VX$$cH&CzW=I)S06&l!)-L9(YKhTSI4-#-n-xob{=^S$H1K`%K=qLGA%$fB1U zMJ@j;b%Tgr*JX9iCK>4VIcUo(Tt~RDGY+58VjXy;xEBS$^h8)Fg^wVVx8i0JtWjczfpy3ho!~BwQ*L$VuP_>~)O9oSbCxN3*2X4Z z-0DQ?XP9&GJk8MC8ZW9568is&;$i{kuQ)43SEXnR^c9C)2p(q)%PT5#Mwlzd*QJHA zJ%!MWU;Z~Cq?DEx7P=r!TAth_zHzSg&r$RAo`m?IC;sg^b1A)3#=(9Ej9 zD!L|$w@ywsGo~84&KiwfI}kd|`FBfLU$^r+=lP)&JiNu&tLn?EDgCk{idnF?6ERUN z0sIKq0I2&VikASl0}cY3Rz-0fummsyI7mD4hI6`MYE->R(@XYerYhQrI!%ePfog{* zL`%&klD$G3&AGUZUN)O>A02|bhdzP3iGF~)fv%ZraSLC)?P~@O^5&wa3V?;;w*&|1 z!@V~*JB&~Yjy?fM1Kv8qpddYFv*KmyvssCSr4zOhe2AX5*OGFUj@j+Fn=aTZv5T4= bwRn}k;Al!C=2ZG>Uy&-9tQh2Rpkd!e&MbMKUAPtI(2;O+uRC3hVTqGrRDE^FF-KdA{d)->=_G`@M9C zrP_u#qMioPKtEGc@l?l$yc0`>51NmRq>fG1_x4Ti7FkUVWtPq2`IvGYI~q%f;7_WC z0sY6E?-UzPTZA;4x#!-Q4O!;K0=}T+(h$-aXiOMZyjM0TJTc^EP$WHT6nT@%OMj4v zDuyVm8S*F(8OF4emlRVUA6Xg1%bvD%+GG{{cP7wWxWP+;Z%)93@&BUksEBDwN70+@ zqRcH(=mPW@Q!ch{wK(ca6dovTbO}K|qRbd7z@Qk_QM!C$&T89ju7eVrYwhY1b^u>rCU(CUARL8{Ui^+PSt%}{5;n&_*dD^ zJeP;Qe)S>82&)7KrCGeD44~$5UI|u{3urrJnwpv1O}J~C+DQ`$33F%0!<>PSggO1O zFIZwj&|-dVOiRFI*Kb+ARX4#|J8^EPvREuLdk8rt`1dJTeRS`#;8|s*_hPH1OA9k` z$8TpHF1Z<&AQ sizeof(char)) { + error(); + + break; + } } else { error(); @@ -75,6 +81,12 @@ int main(){ break; } else if (scanStatus == SCAN_RESULT) { + if (operator == '/' && b == 0) { + error(); + + break; + } + bool validResult = evaluate(a, b, c, operator); if (validResult == true) {