Compare commits

..

2 Commits

Author SHA1 Message Date
f15275a775 21.2 2024-02-21 10:39:06 +01:00
f95070d410 21.2 2024-02-21 10:37:36 +01:00

25
cv1/program.c Normal file
View File

@ -0,0 +1,25 @@
#include <stdio.h>
#include <ctype.h>
int main() {
int lines_count = -1;
int c;
while ((c = getchar()) != EOF) {
if (islower(c)) {
putchar(toupper(c));
} else if (isupper(c)) {
putchar(tolower(c));
} else {
putchar(c);
if (c == '\n') {
lines_count++;
}
}
}
printf("Počet načítaných riadkov: %d\n", lines_count);
return 0;