diff --git a/du1/program b/du1/program new file mode 100755 index 0000000..b13f1b9 Binary files /dev/null and b/du1/program differ diff --git a/du1/program.c b/du1/program.c index e69de29..68631d7 100644 --- a/du1/program.c +++ b/du1/program.c @@ -0,0 +1,29 @@ +#include + + + +int main(){ + int c= 0; + int n=0; // pocet nacitanych znakov + while(1){ + c = getchar(); + + if(c!=-1){ //-1 eof koniec vstupu + if( c >= 'a' && c <= 'z'){ //porovnavam cisla v ascii tabulke + c=c+'A'-'a'; //velke pismeno na male + } + else if(c >= 'A' && c <= 'Z'){ + c=c-'A'+'a'; //male pismeno na velke + } + } + else{ + break; + } + n++; + putchar(c); + + +} +printf("%d\n", n); //vypise pocet zpouzitych znakov +return 0; +} \ No newline at end of file