2024-02-23 13:00:03 +00:00
|
|
|
#include <stdio.h>
|
2024-02-24 19:23:56 +00:00
|
|
|
|
2024-02-24 19:02:50 +00:00
|
|
|
int main() {
|
2024-02-25 20:23:20 +00:00
|
|
|
int c;
|
|
|
|
int lineCount = 0;
|
2024-02-24 19:02:50 +00:00
|
|
|
|
2024-02-25 20:23:20 +00:00
|
|
|
while ((c = getchar()) != EOF) {
|
|
|
|
if (c >= 'a' && c <= 'z') {
|
|
|
|
c = c - 'a' + 'A';
|
|
|
|
} else if (c >= 'A' && c <= 'Z') {
|
|
|
|
c = c - 'A' + 'a';
|
2024-02-24 19:02:50 +00:00
|
|
|
}
|
|
|
|
|
2024-02-25 20:23:20 +00:00
|
|
|
if (c == '\n') {
|
|
|
|
lineCount++;
|
2024-02-24 19:23:56 +00:00
|
|
|
}
|
2024-02-25 20:54:37 +00:00
|
|
|
|
2024-02-25 20:23:20 +00:00
|
|
|
|
|
|
|
putchar(c);
|
2024-02-23 12:58:04 +00:00
|
|
|
}
|
2024-02-24 19:02:50 +00:00
|
|
|
|
2024-02-25 20:23:20 +00:00
|
|
|
|
2024-02-25 20:48:29 +00:00
|
|
|
printf("\nLines␣count: %d\n",lineCount);
|
2024-02-24 19:02:50 +00:00
|
|
|
|
2024-02-25 20:55:56 +00:00
|
|
|
return -1;
|
2024-02-23 12:58:04 +00:00
|
|
|
}
|