25 lines
464 B
C
25 lines
464 B
C
|
#include <stdio.h>
|
||
|
#include <ctype.h>
|
||
|
|
||
|
int main() {
|
||
|
int lines_count = -1;
|
||
|
int c;
|
||
|
|
||
|
while ((c = getchar()) != EOF) {
|
||
|
if (islower(c)) {
|
||
|
putchar(toupper(c));
|
||
|
} else if (isupper(c)) {
|
||
|
putchar(tolower(c));
|
||
|
} else {
|
||
|
putchar(c);
|
||
|
if (c == '\n') {
|
||
|
lines_count++;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
printf("Počet načítaných riadkov: %d\n", lines_count);
|
||
|
|
||
|
return 0;
|
||
|
}
|