From 2def5df9e8eeae209bacfd922b74be2770da4f44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michaela=20=C5=A0akov=C3=A1?= Date: Mon, 25 Mar 2019 16:09:05 +0100 Subject: [PATCH] test --- Makefile | 4 ++++ program | Bin 0 -> 5532 bytes program.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 Makefile create mode 100755 program create mode 100644 program.c diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..70bdd14 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +git: + git add . + git commit -am "test" + git push diff --git a/program b/program new file mode 100755 index 0000000000000000000000000000000000000000..31729792827d1424dcdf3fe17ed4cc0d56714611 GIT binary patch literal 5532 zcmb7I3v5)!6`lP+HUVry$|u1J+tyH%+Ruja4MN3VJ~7~c!zU;_*8A~pvma~sEx`yi zkcEI{Td`WyxD`riRMDnNCEB9aZBYwxLqb$l6sc86AvG#d?S@2dNYF-2*q$@<#yp!K zwIkg(_sl)_&VSy#_e?`mqs!$II=O{M5S`3;>2$<#4EguwL5T$ojzV zgN-r*Orf21P}YFI26a>FfhpS7{H_%$fq%(iua8m+8%5h6gB|dWq~lk`W35&3P-Q%p z%Ee&L5I>-_1X|2RY4nN~W$H0aC5VaCzP52Zl^M(`-wml4iyVq%G4F7^WbHXNfS^ZbWG)mNc`Oa0t9uCKX)1+{^?6 z$%tsrS{cz6wt~?>8aBGwF%p4TQmk%TTU%!?G?tEP)oh4c_Fu187ZAsv!Zb4$o5GRW z3SE{<>=prO72-&r*EbOZ*@yfdbo>}|4Cry@DE}dIbnM5>F}RO+zPmYh-8)409R~)s zO&6l;+n*K+g+mvu2}4Uzx^2h#0U-*Dd*M--dlXM{3v*dRl zluaByBQa}^<c3Fl^w#2p{#1 zN&UZqd*vxSa`}l*yKfBiBa%3D#`+jN%3YuJy0?tR!iDn#y*<`E(N84#XY=mPSI_=y zj_bmo^I16lMmk>9j-B;oUhRC5&Zp*)uzw{3i0u6`yl-e9nsjag%UtJg3`BZ=a1%D7u8ELHzHW#k2Iv)xQtExOdju!^pDJF+3hN*N3pfH{o&Rtt)S#a3TwD ze1^iSC>)J2eD?_FNIo?#!p~UveP@L8wO_3!zCAuwi0#~{>I`*@xe>AP zQSn4mgQ#1xy|zZUW_wm}^YLt5g=X+Q*Nt9mL(cP?$+dTraP9NCW>5Bdk6;b>Q6}FX z;O~MiihPYllh+kbvb=l5*B@N*@WQe$(Y^{&fmnZnkEki~9dg%Bnc#WT^%~-!M6_cM zH$$kC!b4#)q#W;J9A;t=Tm1p#d?(IEPA8thy}+`5yQ~}UypL}cQm2vQ=n_rO;;ch{ z8TdZrPeCR@7$4`DOdOAH>{9l-9Kyb0ti()+K>gJ7h{N{)8_4%Lb1d!D8z{&4r`YBZ zQYvn@P zpa@}PIucf(6}gpGc~on$q!muL3nQ7b!bVN)+Da?XW}~)b)@aSf@WPLUgh3PyWTL_d zbtDl_P6c?o zGzq!p{SG?kiB0Dj%5My9L(!=ICiG$mc|2Qt@51{l?5vkOUS5vgh4(ku(M8FV-z?yb z03(x$ZQ%S~gXnm?pB_Qs`1TPGJ9s>^yTS9LOeb*J6wI2Gxx}qEaaU)VXj!j z$9_^+?Mm(&g*hv@e~e-=B!L z0?RKC1*-1!5P*qo0bM*dFIPBYqXOBldW@@P&K< z*xBC8z`8!ZIo}7?z$_Mi9Rx*41q?o7Qe_ z!H&@FE*0R2ikqOJ| ztB&p<^N-OO=GY%k7}8A2j0Tb+)N#kZr*Z$6#>N@#5(fb-NMdB{L5Q@Q(WlW%+@|d! r`FqM-x7*xgFNeB#Ad|sb82f|kb`48m!2sy_;K=A@GiF@m6o~%<`S^7r literal 0 HcmV?d00001 diff --git a/program.c b/program.c new file mode 100644 index 0000000..3b38d5e --- /dev/null +++ b/program.c @@ -0,0 +1,42 @@ +#include + +int main(){ + float a,b,v; + int o,p; + scanf("%f",&a); + while((o=getchar())==' '){ + } + scanf("%f",&b); + while((p=getchar())==' '||(p=getchar())=='='){ + } + scanf("%f",&v); + switch(o){ + case '+':if(v==(a+b)){ + printf("OK\n"); + }else{ + printf("ZLE\n"); + } + break; + case '-':if(v==(a-b)){ + printf("OK\n"); + }else{ + printf("ZLE\n"); + } + break; + case '*':if(v==(a*b)){ + printf("OK\n"); + }else{ + printf("ZLE\n"); + } + break; + case '/':if(v==(a/b)&&b!=0){ + printf("OK\n"); + }else{ + printf("ZLE\n"); + } + break; + default: printf("CHYBA\n"); + break; + } +return 0; +}