This commit is contained in:
Jakub Frankovič 2026-02-20 10:38:14 +01:00
parent 0ec8b25220
commit bb23434095
2 changed files with 23 additions and 0 deletions

BIN
a1/.program.c.swp → a1/capslock Normal file → Executable file

Binary file not shown.

23
a1/capslock.c Normal file
View File

@ -0,0 +1,23 @@
#include <stdio.h>
#include <ctype.h>
int main() {
int c;
int lines = 0;
while ((c = getchar()) != EOF) {
if (islower(c)) {
putchar(toupper(c));
} else if (isupper(c)) {
putchar(tolower(c));
} else if (c == '\n') {
putchar(c);
lines++;
} else if (isprint(c)) {
putchar(c);
}
}
printf("\nRiadky: %d\n", lines);
return 0;
}