This commit is contained in:
Tamáš 2024-02-21 15:58:18 +01:00
parent c34e51c132
commit 533848832d

View File

@ -5,27 +5,29 @@ int main() {
int lines_count = 0; int lines_count = 0;
while ((c = getchar()) != EOF) { while ((c = getchar()) != EOF) {
if (c >= 'a' && c <= 'z') { if (c >= 'a' && c <= 'z') {
c = c - 'a' + 'A'; c = c - 'a' + 'A';
} }
else if (c >= 'A' && c <= 'Z') { else if (c >= 'A' && c <= 'Z') {
c = c - 'A' + 'a'; c = c - 'A' + 'a';
} }
else if (c == '\n') { else if (c == '\n') {
lines_count++; lines_count++;
putchar('\n');
} }
putchar(c); putchar(c);
} }
printf("\nLines Count: %d\n", lines_count); printf("Lines count: %d\n", lines_count);
return 0; return 0;
} }