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

View File

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