27 lines
404 B
C
27 lines
404 B
C
#include <stdio.h>
|
|
int main(){
|
|
|
|
|
|
char word;
|
|
|
|
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') {
|
|
count++;
|
|
for (int i = 0; i <= count; i++) {
|
|
printf("\n");
|
|
}
|
|
printf("Počet riadkov: %d\n", count);
|
|
}
|
|
putchar(word);
|
|
|
|
}
|
|
|
|
return 0;
|
|
}
|