32 lines
458 B
C
32 lines
458 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <ctype.h>
|
|
|
|
int main() {
|
|
int o;
|
|
int riadok = 0;
|
|
|
|
while ((o = getchar()) != EOF) {
|
|
if (o >= 'a' && o <= 'z') {
|
|
putchar(o - 32);
|
|
}
|
|
else if (o >= 'A' && o <= 'Z') {
|
|
putchar(o + 32);
|
|
}
|
|
else if (o == '\n') {
|
|
putchar(o);
|
|
riadok = riadok + 1;
|
|
|
|
|
|
}
|
|
|
|
else if (isprint(o)) {
|
|
putchar(o);
|
|
}
|
|
}
|
|
|
|
printf("Lines count: %d\n", riadok);
|
|
|
|
return 0;
|
|
}
|