24 lines
544 B
C
24 lines
544 B
C
#include <stdio.h>
|
|
|
|
int main() {
|
|
int ch;
|
|
int line_count = 0;
|
|
while ((ch = getchar()) != EOF) {
|
|
if (ch == '\n') {
|
|
putchar('\n');
|
|
line_count++;
|
|
} else {
|
|
if (ch >= 'a' && ch <= 'z') {
|
|
putchar(ch - 32);
|
|
} else if (ch >= 'A' && ch <= 'Z') {
|
|
putchar(ch + 32);
|
|
} else if ((ch >= 32 && ch < 127) || ch==9){
|
|
putchar(ch);
|
|
}
|
|
}
|
|
}
|
|
|
|
printf("\nLines count: %d\n", line_count);
|
|
|
|
return 0;
|
|
} |