26 lines
604 B
C
26 lines
604 B
C
#include <stdio.h>
|
|
|
|
int main() {
|
|
int text;
|
|
int lines_count = 0;
|
|
|
|
while ((text = getchar()) != EOF) {
|
|
if (text == '\n') {
|
|
putchar('\n');
|
|
lines_count++;
|
|
} else if (text == '\t') {
|
|
putchar('\t');
|
|
continue;
|
|
} else if ((text >= 'a' && text <= 'z') || (text >= 'A' && text <= 'Z')) {
|
|
putchar(text ^ ' ');
|
|
} else if ((text >= 32 && text < 127) || text == 9) {
|
|
putchar(text);
|
|
} else {
|
|
continue;
|
|
}
|
|
}
|
|
|
|
printf("\nLines count: %d\n", lines_count);
|
|
|
|
return 0;
|
|
} |