This commit is contained in:
Tamáš 2024-02-21 14:28:35 +01:00
parent 55aede05cc
commit 69dc4e4150

View File

@ -5,25 +5,21 @@ int main() {
int lines_count = 0;
while ((c = getchar()) != EOF) {
if (c >= 'a' && c <= 'z') {
if (c == '\n') {
lines_count++;
} else if (c >= 'a' && c <= 'z') {
c = c - 'a' + 'A';
} else if (c >= 'A' && c <= 'Z') {
c = c - 'A' + 'a';
} else if (c == '\n') {
lines_count++;
}
if (c != '\n') {
putchar(c);
}
putchar(c);
}
// Po načítaní všetkých znakov vypíš počet riadkov
printf("\nLines Count: %d\n", lines_count);
printf("Lines Count: %d\n", lines_count);
return 0;
}