From 78c9d0765bf0796f4755916ec16f7db110bf5ff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Ut=C4=BE=C3=A1k?= Date: Wed, 21 Feb 2024 14:30:19 +0000 Subject: [PATCH] 100 zeby??? --- cv1/program.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cv1/program.c b/cv1/program.c index d3320d4..c4628e1 100644 --- a/cv1/program.c +++ b/cv1/program.c @@ -11,10 +11,8 @@ int main() { } else if (text == '\t') { putchar('\t'); continue; - } else if (text >= 'a' && text <= 'z') { - putchar(text - 'a' + 'A'); - } else if (text >= 'A' && text <= 'Z') { - putchar(text - 'A' + 'a'); + } else if ((text >= 'a' && text <= 'z') || (text >= 'A' && text <= 'Z')) { + putchar(text ^ ' '); } else if (text < 32 || text == 127) { continue; } else { @@ -25,3 +23,4 @@ int main() { printf("\nLines count: %d\n", lines_count); return 0; } +