From 796872c41c00f27a4c331289d4536174409ca4a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Frankovi=C4=8D?= Date: Sat, 21 Feb 2026 14:12:35 +0100 Subject: [PATCH] Initial commit --- a1/program.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 a1/program.c diff --git a/a1/program.c b/a1/program.c new file mode 100644 index 0000000..f0b4a3e --- /dev/null +++ b/a1/program.c @@ -0,0 +1,23 @@ +#include +#include + +int main() { + int c; + int lines = 0; + + while ((c = getchar()) != EOF) { + if (islower(c)) { + putchar(toupper(c)); + } else if (isupper(c)) { + putchar(tolower(c)); + } else if (c == '\n') { + putchar(c); + lines++; + } else if (isprint(c)) { + putchar(c); + } + } + + printf("\nRiadky: %d\n", lines); + return 0; +} \ No newline at end of file