From 350dd1996051bb40a4ec566387aba572fd4c0b46 Mon Sep 17 00:00:00 2001 From: Peter Sabol Date: Thu, 31 Mar 2022 10:10:11 +0200 Subject: [PATCH] funguje --- du4/program | Bin 7351 -> 7922 bytes du4/program.c | 12 ++++++++++++ 2 files changed, 12 insertions(+) diff --git a/du4/program b/du4/program index 18bfcf1e0fcb8d2815d2528c1fd65ef42dca5c0f..bbcaec86418ad32d2ea9e7bf822e447a39384d64 100755 GIT binary patch delta 3212 zcmai0Yiv|S6rQ_#cYC*N_g%V$hAptIMWM7>w1i?>C{m$Fl~P~e6YG+IqM}B{6x^+* zf!3{~0tyDACM5o_T15=R6jwzOe^djBASfhAwpa`*B0jI*H+Od}B(;g{{*EP+1{LsK4kTnlO*`Li~|zmbB>7XaNL8*CB(Ygra3xgW>}z)f7leP8y1 z`^H7wt#Yp|6cMJj} z2g0{}Il{4t!|3zVdv(JJ*Be0{2rmShhsj}5B%y>9wn|AcE=r2bR*)hElSy4dRFNWC zHKa&MEh#K5iVquUQ*;QiE_E;X>*Ifzrr9~L+L4|I^YM?2TT{vrbDA4d%rYPTWSC`i zCC2X1F-$Sb=u(Wbp+SY|T8uFb4Jb?(V`1Vxh3RUnlz5xj0Ztixj#ZG6R0HUHtcrN8 z!i*tSOT0>9#uBS1zC&Tg6l)@G0j@rMTi5aUi8C#&H^c_9AhA2}yS^>9;%VJTKZ^lp zlmC2jr6Y9JT+E-sM90rNAGQ6I+67etsrY$u*SGQE@IF0Cp*gremF!+!E_M-Nyxire zSfC_dQ1VVWr>&jY1gUs9sOB2!H8A*zgFJ2jPpS6gb_3N8-Q%)G3Ufw`q@3a$XVZJ+ z0%t`D6?Zj8jeU(#J&grlpNQ^({w_V5E|I;?(45s+?d@t5Sf~Cp&CCezPEnWdO)Q3Z z1jqCyW?#Tb40sdOPI=1NpuHt0=RKiK>)(;*(zMI^-!|^n9LQPvRXHaALHg5^A8~p+ zlQ1ve%rBaHG!fl|{?R3tcjqv+yD?fp*NT2K&1`=x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;NQCo98fue%~Y~ zhJ&&t>~TfWDx!Y*GL-BGF+7Q;n(sh3pvV03>u{a^kY8R1*E#1Db1!2`YMiG~8sEwJ zC66SSO`d~8@bod5Qw)dwIIDWFF<(@aFcN8F`vjR-8}l8u3&F;GeeD9VvHcP=%Qj}U ziiBX2Z2`+x2>z3>F`qTNkZsJzUWgRZZDZD&{V&1BtV3i58MiU((Y^pSW?kABz{afO zB|WW)*9FW*0EYVaiFd(SSHv3bADWu{sBBCkmCc2Q zzb?n18y(XiaBfcC*)zbot!vo&1>oGA)Vpzob6eL$sfYmcO=VXoLJSjl#j~Rdd;tS_ z5}Ra~Dbjsn4Gf|^@`3WkY8EO@1LCap4#aF$#6|c+x6L-&Ti#eypEWDg%ft^5r#t1j z@(BqTuTjQ6QG?Yv8P_O8q9y@P8a4TJ;9Nm5$Yx*`kZm6jw`BdfID=UX%s&Tg%Cuh& xoEug6XaQEQK7|bHxlsnJx7SDED&Y5lb0uGd2EA*Pp7w|OuH5i~E;m;`@*lBYy-5H7 diff --git a/du4/program.c b/du4/program.c index 99281b6..ecaa58b 100644 --- a/du4/program.c +++ b/du4/program.c @@ -105,6 +105,9 @@ int main(){ msum=values[2]; if(operation=='+'){ rsum=values[0]+values[1]; + char rmsum[50]; + sprintf(rmsum, "%.2f", msum); + msum = atof(rmsum); if(msum==rsum){ printf("OK\n"); } @@ -115,6 +118,9 @@ int main(){ } else if(operation=='-'){ rsum=values[0]-values[1]; + char rmsum[50]; + sprintf(rmsum, "%.2f", msum); + msum = atof(rmsum); if(msum==rsum){ printf("OK\n"); } @@ -125,6 +131,9 @@ int main(){ } else if(operation=='*'){ rsum=values[0]*values[1]; + char rmsum[50]; + sprintf(rmsum, "%.2f", msum); + msum = atof(rmsum); if(msum==rsum){ printf("OK\n"); } @@ -135,6 +144,9 @@ int main(){ } else if(operation=='/'){ rsum=values[0]/values[1]; + char rmsum[50]; + sprintf(rmsum, "%.2f", msum); + msum = atof(rmsum); if(msum==rsum){ printf("OK\n"); }