33 lines
429 B
C
33 lines
429 B
C
#include <stdio.h>
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
|
char word;
|
|
int i = 0;
|
|
for (int count = 0; (word = getchar()) != EOF;) {
|
|
if (word >= 'a'&&word <= 'z') {
|
|
word -= 32;
|
|
}
|
|
else if (word >= 'A'&&word <= 'Z'){
|
|
word += 32;
|
|
}
|
|
if (word == '\n') {
|
|
while (word + i == '\n') {
|
|
count++;
|
|
i++;
|
|
}
|
|
i = 0;
|
|
printf("\nPočet riadkov: %d", count);
|
|
count = 0;
|
|
}
|
|
putchar(word);
|
|
}
|
|
return 0;
|
|
|
|
}
|
|
|
|
|