From 2ad0ce0f99857f61218517e344a72ea310745c75 Mon Sep 17 00:00:00 2001 From: Michal Utlak Date: Wed, 21 Feb 2024 14:11:07 +0100 Subject: [PATCH] skuska --- cv1/program.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/cv1/program.c b/cv1/program.c index 3b85483..137c79e 100644 --- a/cv1/program.c +++ b/cv1/program.c @@ -2,27 +2,22 @@ int main() { int text; + int lines_count = 0; -<<<<<<< HEAD while ((text = getchar()) != EOF) { if (text >= 'a' && text <= 'z') { text = text - 'a' + 'A'; } else if (text >= 'A' && text <= 'Z') { text = text - 'A' + 'a'; } else if (text == '\n') { - printf("\n"); - continue; + lines_count++; } else if (text < 32 || text == 127) { continue; } -======= - printf("hello world\n"); - return 1; ->>>>>>> ae41227d7eccd9cfc8364f26b732c73f151b6d66 putchar(text); } - printf("\nPocet riadkov: 1\n"); + printf("\nLines count: %d\n", lines_count); return 0; }