2020-02-19 11:13:05 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
int main(){
|
2020-02-29 23:14:45 +00:00
|
|
|
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++;
|
2020-02-29 23:16:40 +00:00
|
|
|
for(int i =0;i<count;i++){
|
|
|
|
printf("\n");
|
|
|
|
}
|
2020-02-29 23:14:45 +00:00
|
|
|
printf("\nPočet riadkov: %d\n", count);
|
|
|
|
}
|
|
|
|
putchar(word);
|
|
|
|
|
|
|
|
}
|
2020-02-19 11:13:05 +00:00
|
|
|
return 0;
|
|
|
|
}
|