2024-02-21 13:04:04 +00:00
|
|
|
#include <stdio.h>
|
2024-02-17 19:30:32 +00:00
|
|
|
|
2024-02-21 13:04:04 +00:00
|
|
|
int main() {
|
|
|
|
int c = 0;
|
|
|
|
int pocet_riadkov = 0;
|
|
|
|
|
|
|
|
while ((c = getchar()) != EOF) {
|
|
|
|
if (c >= 'a' && c <= 'z') {
|
|
|
|
|
|
|
|
c = c - 'a' + 'A';
|
|
|
|
} else if (c >= 'A' && c <= 'Z') {
|
|
|
|
|
|
|
|
c = c - 'A' + 'a';
|
|
|
|
} else if (c == '\n') {
|
|
|
|
|
|
|
|
pocet_riadkov++;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (c != '\n') {
|
|
|
|
putchar(c);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Po načítaní všetkých znakov vypíš počet riadkov
|
|
|
|
printf("\nPocet nacitanych riadkov: %d\n", pocet_riadkov);
|
|
|
|
|
|
|
|
return 0;
|
2024-02-17 19:30:32 +00:00
|
|
|
}
|
2024-02-21 13:04:04 +00:00
|
|
|
|