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