From 6b299f777225451100c4310b438d8db1ba916475 Mon Sep 17 00:00:00 2001 From: Peter Sabol Date: Thu, 3 Mar 2022 14:27:06 +0100 Subject: [PATCH] funguje --- du1/program | Bin 5186 -> 6350 bytes du1/program.c | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/du1/program b/du1/program index c6d46618126269d39640a3b84fd09aff8508a675..acc2392ff0073389928ae0a05496b567b2faeab7 100755 GIT binary patch literal 6350 zcmb7Ie{5CN9Y6Q|C{J1*1*$_~@?;MMBeyLUWe~KFmI7KpO2MGc%WdCn-;>w(y7%s_ zln{UH3BrJ+ZpLY{IhUBtWNfmGEsZ0tT7*S5DAh9NWsL{Jb76+@9G$g|Z-(z;uQyci8`0kdD~ z0}v+wPC!S#2u!A)eUR6~em(jow*r&3?w*g`oqeGQ`4;HNTE7K)z%P;ZU!O^L z)n}4RGwH0i+brbFWvVTPCg-+p(>B?b<7Ar{n7-@4j1BeM?)dQKi%0)_(@UY--tU_I zZtbqe>@n)5fpr|&RuiT(LA0Z9?VmasyO``s_W6su|1yH=Db!eoW~02K0+;s@gRZ$k zzoY_R2YdqYpPU zqtbI}`Ej%;EgHs?6{SV&A;sdk574Bvh&`pKJ2xgVdrWbd=SC!E&#Ae@$0X(mQZeEe zfEzz~@Zg8Vk1pQR*^znyu}wALv1NPe@DriP`0rux&!H)FXnuUOykhu0xLbM#kK*O3 zhXa>Jhv8XZBA;$M_;K;V+|!{rm8G#aM~9BMH;Q2*Y5&^gz`@sF`|AQ@>`#|HG<-!i zd|Nj>*cuP%#&5In@f&II*lIcu-W=&ZGQJl>JQZf0@#dw`o}r%%V}qjm>-9LUo)`x; z7{|FmG&$$uLCr@Oix*<2TjLCn82{xLr4l->EAEZgH9sQ7eUHvK#F~-Vf!6qf^Q)=a zsZ@J>)wohEq^jiJOflW7DZ;673T>vJkI(~~&wLe+gQ57ihmOt<4WWLnKhY7yef)Y< z%YkFUiniU`SlYgId><5#k9yce#S8NfW#SD-ejUOL#((p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5CRj|diD0>8B+57?Hg zc5Q$@y#!z}m9d|>z6{LIT?f`VxUxk}Bt`!N2RF^z*pMzSZnz7~a!MP_!i$j^u#Xr9 z>y`}W0;fj=i_#3t0BSSz8SslXtK^gp6=K++Pt-3P*5tMPKKXjV=KRcmF4fiPe=8g1 Ise-cq0e?31A^-pY diff --git a/du1/program.c b/du1/program.c index e69de29..1fadac1 100644 --- a/du1/program.c +++ b/du1/program.c @@ -0,0 +1,23 @@ +#include +#include + + +int main(){ + int inp_char; + char out_char; + int count_lines = 0; + while(1){ + inp_char = getchar(); + if(inp_char >= 'A' && inp_char <= 'Z') out_char = inp_char + 32; + else if(inp_char >= 'a' && inp_char <= 'z') out_char = inp_char - 32; + else if(inp_char == EOF) break; + else if(inp_char == '\n') { + count_lines++; + out_char = '\n'; + } + else out_char = inp_char; + putchar(out_char); + } + printf("\nPočet riadkov: %d\n", count_lines); + return 0; +}