pvjc24/cv1/program.c
2024-02-21 14:28:35 +01:00

26 lines
424 B
C

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