From ba867544453622e6047e5db04756c1dccbefbab6 Mon Sep 17 00:00:00 2001 From: Vladyslav Korzun Date: Fri, 17 Feb 2023 12:16:43 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB(?= =?UTF-8?q?=D0=B0)=20=D0=BD=D0=B0=20'du1/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- du1/program.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/du1/program.c b/du1/program.c index aceb113..6e196bd 100644 --- a/du1/program.c +++ b/du1/program.c @@ -7,6 +7,10 @@ int count = 0; int riadok = 0; while(c != EOF){ c = getchar(); +if(c == 10){ +printf("\n"); +riadok++; +} if(islower(c)){ c = toupper(c); printf("%c\n", c); @@ -17,9 +21,10 @@ if(isupper(c) && count == 0){ c = tolower(c); printf("%c\n", c); riadok++; -} +} + count = 0; } printf("\nPočet riadkov: %d\n", riadok); return 0; -} +} \ No newline at end of file