27 lines
423 B
C
27 lines
423 B
C
#include <stdio.h>
|
|
|
|
int main() {
|
|
int c;
|
|
int lineCount = 0;
|
|
|
|
while ((c = getchar()) != EOF) {
|
|
if (c >= 'a' && c <= 'z') {
|
|
c = c - 'a' + 'A';
|
|
} else if (c >= 'A' && c <= 'Z') {
|
|
c = c - 'A' + 'a';
|
|
}
|
|
|
|
if (c == '\n') {
|
|
lineCount++;
|
|
}
|
|
|
|
|
|
putchar(c);
|
|
}
|
|
|
|
|
|
printf("\nLines␣count: %d\n",lineCount);
|
|
|
|
return 0;
|
|
}
|