2024-02-21 09:37:36 +00:00
|
|
|
#include <stdio.h>
|
2024-02-22 13:34:00 +00:00
|
|
|
#include <ctype.h>
|
2024-02-21 09:37:36 +00:00
|
|
|
|
|
|
|
int main() {
|
2024-02-22 13:31:54 +00:00
|
|
|
int lines_count = 0;
|
2024-02-22 13:34:00 +00:00
|
|
|
int c;
|
2024-02-21 09:37:36 +00:00
|
|
|
|
|
|
|
while ((c = getchar()) != EOF) {
|
2024-02-22 13:34:00 +00:00
|
|
|
if (islower(c)) {
|
|
|
|
putchar(toupper(c));
|
|
|
|
} else if (isupper(c)) {
|
|
|
|
putchar(tolower(c));
|
|
|
|
} else {
|
|
|
|
putchar(c);
|
|
|
|
if (c == '\n') {
|
|
|
|
lines_count++;
|
|
|
|
}
|
2024-02-21 09:37:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-02-22 13:34:00 +00:00
|
|
|
printf("Počet načítaných riadkov: %d\n", lines_count);
|
2024-02-21 09:37:36 +00:00
|
|
|
|
|
|
|
return 0;
|
2024-02-22 13:34:00 +00:00
|
|
|
|
|
|
|
|
|
|
|
}
|