diff --git a/cv1/program.c b/cv1/program.c new file mode 100644 index 0000000..9089da1 --- /dev/null +++ b/cv1/program.c @@ -0,0 +1,24 @@ +#include +#include + +int main() { + int lines_count = -1; + int c; + + while ((c = getchar()) != EOF) { + if (islower(c)) { + putchar(toupper(c)); + } else if (isupper(c)) { + putchar(tolower(c)); + } else { + putchar(c); + if (c == '\n') { + lines_count++; + } + } + } + + printf("Počet načítaných riadkov: %d\n", lines_count); + + return 0; +}