2024-02-22 17:29:45 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
int c;
|
|
|
|
char output;
|
|
|
|
int count_line = 0;
|
|
|
|
|
|
|
|
while ((c = getchar()) != EOF) {
|
|
|
|
if (islower(c)) {
|
|
|
|
output = toupper(c);
|
|
|
|
}
|
|
|
|
else if (isupper(c)) {
|
|
|
|
output = tolower(c);
|
|
|
|
}
|
|
|
|
else if (isgraph(c) || c == ' ') {
|
|
|
|
output = c;
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
output = c;
|
|
|
|
}
|
|
|
|
putchar(output);
|
|
|
|
if (c == '\n') {
|
|
|
|
count_line++;
|
|
|
|
}
|
|
|
|
}
|
2024-02-22 18:15:58 +00:00
|
|
|
printf("Pocet riadkov: %d\n", count_line);
|
2024-02-22 17:29:45 +00:00
|
|
|
return 0;
|
|
|
|
}
|