pvjc24/cv1/program.c
2024-02-22 14:42:41 +01:00

27 lines
442 B
C

#include <stdio.h>
int main() {
int c;
int lines = 0;
while ((c = getchar()) != EOF) {
if (c >= 'a' && c <= 'z') {
c -= 32;
} else if (c >= 'A' && c <= 'Z') {
c += 32;
}
if (c == '\n') {
lines++;
}
if (c >= 32 && c <= 126) {
putchar(c);
}
}
printf("\nPočet načítaných riadkov: %d\n", lines);
return 0;
}