From e85b74c55a39990615231bc5aa1a80dcd9c83b0b Mon Sep 17 00:00:00 2001 From: Vladyslav Korzun Date: Sun, 19 Feb 2023 10:50:23 +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 | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/du1/program.c b/du1/program.c index 3a576da..34f6509 100644 --- a/du1/program.c +++ b/du1/program.c @@ -10,24 +10,21 @@ c = getchar(); if(c == EOF){ break; } - if (c == '\n'){ - riadok++; - } +if(c == '\n'){ +riadok++; +} if((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')){ if(islower(c)){ c = toupper(c); -//printf("%c\n", c); -//riadok++; count++; } if(isupper(c) && count == 0){ c = tolower(c); -//printf("%c\n", c); -//riadok++; } riadok++; } putchar(c); +count = 0; } printf("\nPočet riadkov: %d\n", riadok); return 0;