From f406e24e0c16b0fba3ddc39ac870cc79810f8d2b Mon Sep 17 00:00:00 2001 From: Anton Date: Tue, 8 Oct 2024 15:28:33 +0200 Subject: [PATCH] Initializacia --- cv3/program | Bin 0 -> 16192 bytes cv3/program.c | 37 +++++++++++++++++++++++++++++++++++++ cv4/program.c | 0 3 files changed, 37 insertions(+) create mode 100755 cv3/program create mode 100644 cv3/program.c create mode 100644 cv4/program.c diff --git a/cv3/program b/cv3/program new file mode 100755 index 0000000000000000000000000000000000000000..5129b5614948935f1ce4a47a24b3d7a0a1e7acfd GIT binary patch literal 16192 zcmeHOYitzP6~4Q?oCffc@G#JX4TXw;yx3r#5n;g?#uX12Y_(0(4(r`ndzF2-yR(f= zD{6_-g20mVhoUq;Kxzb1Q;A4bMAfJ@g%XHV6k1gx>L1dU%BZ9P)3l@wY`=5oobhmGkTf?D{k}^R(t4O*YahNzO`qyv;5Lau}G<+{m zPpZj~Cu+{o#~pyyDc8bdv4;5xK=P}jN)`OHLn}e)AtCvVR}M{aG=hqcgZw6uie*2( z%Ka1+z1v=toKd3s+r^1wfFkJiqud;?*J^cq!&vO)_6{+MABp65n*C0*pWtn7Pf+qn zIib&5&Zi$6praz__v>aqKW=f{lpwW1WzP*e^)T(VvEQPo4x{|o1+J6eTb0k$uv$cJPnX-yjSEgiJ#r7S|*+SlGPjqH2 zG}M(VNkPLgO0g}{9oC<9|oCNqsjuf^OFL`Q%AH`F@OgH|qbPS8ja2_3+iN8i#*x9Qfnyw)U3Bp~lO` zz=pTci^{Cu!1Ax@SnYyuLqq}wHhcue7??CduPXEamFu+&`pND*BkV70 z`&GXnc=~~H__lHGFB^?>_a+#ji^kOl_Dlpg$N_39*VDS6;!pYO-!K5RDlh9W4s7V8 zs&V*+J=Hj}Aq`>p-3OJ*a0`U-sA_R0U|i%?Rf1AaJl{VC(f#KlW=oR)iy zL&lL=i{WStv<&_%rP;TJFCZw6s5~1-`Z1majKgmY_k%l2=km`PW1! zFJ&y7sk>`W8lDQpWehz!96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4;Pw*!`|Ld#}r1^-qh@WuIyl^ysGLI6J=R&df=kJ$L zP!n?gRg^6m7qTee_ow-Y*MAZF2{wr%qu<||r;fJ&MfMkb&F3%UN9Y@+KKuk&nrBP@<-SPIlhSwX$X|6l@LGMrrCqV5X>~RK1pTm~ K%=0<;MD;IfD6+T! literal 0 HcmV?d00001 diff --git a/cv3/program.c b/cv3/program.c new file mode 100644 index 0000000..5654e5b --- /dev/null +++ b/cv3/program.c @@ -0,0 +1,37 @@ +#include +#include + +#define LINE_SIZE 100 +#define STACK_SIZE 100 + +struct stack{ + float values[LINE_SIZE]; + int size; +} + +void print_stack(struct stack* stack){ + for (int i = 0; i < stack->size; i++){ + printf("%.0f", stack->values[i]); + } + printf("\n"); +} + +int main(){ + char input[LINE_SIZE]; float y; + memset(&mystack, 0, sizzeof(struct stack)); + + while(fgets(input, LINE_SIZE, stdin) != NULL){ + input[strlen(input - 1)] = '\0'; + if(sscanf(input, "\f", &y) == 1){ + printf("Success!\n"); + assert(mystack.size < STACK_SIZE); + mystack.values[mystack.size] = y; + mystack.size ++; + } esle{ + return 1; + } + print_stack(&mystack); + } + return 0; +} + diff --git a/cv4/program.c b/cv4/program.c new file mode 100644 index 0000000..e69de29