26 lines
496 B
C
26 lines
496 B
C
#include <stdio.h>
|
|
#include <ctype.h>
|
|
|
|
int main() {
|
|
int line_count = 0;
|
|
char input_char;
|
|
|
|
while ((input_char = getchar()) != EOF) {
|
|
if (input_char == '\n') {
|
|
line_count++;
|
|
}
|
|
|
|
if (islower(input_char)) {
|
|
input_char = toupper(input_char);
|
|
} else if (isupper(input_char)) {
|
|
input_char = tolower(input_char);
|
|
}
|
|
|
|
putchar(input_char);
|
|
}
|
|
|
|
printf("\nLines␣count:%d\n", line_count);
|
|
|
|
return 0;
|
|
}
|