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