2020-02-19 11:13:05 +00:00
|
|
|
#include <stdio.h>
|
2020-03-01 09:23:10 +00:00
|
|
|
|
2020-03-01 09:05:25 +00:00
|
|
|
|
2020-02-29 23:14:45 +00:00
|
|
|
|
2020-03-01 09:23:10 +00:00
|
|
|
int main() {
|
|
|
|
|
2020-03-01 09:02:42 +00:00
|
|
|
|
2020-03-01 09:23:10 +00:00
|
|
|
char word;
|
|
|
|
int i = 0;
|
2020-02-29 23:14:45 +00:00
|
|
|
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') {
|
2020-03-01 09:23:10 +00:00
|
|
|
while (word + i == '\n') {
|
|
|
|
count++;
|
|
|
|
i++;
|
2020-03-01 09:02:42 +00:00
|
|
|
}
|
2020-03-01 09:23:10 +00:00
|
|
|
i = 0;
|
2020-03-01 09:23:47 +00:00
|
|
|
printf("\n\nPočet riadkov: %d", count);
|
2020-03-01 09:23:10 +00:00
|
|
|
count = 0;
|
2020-02-29 23:14:45 +00:00
|
|
|
}
|
|
|
|
putchar(word);
|
2020-03-01 09:23:10 +00:00
|
|
|
}
|
2020-02-19 11:13:05 +00:00
|
|
|
return 0;
|
2020-03-01 09:23:10 +00:00
|
|
|
|
2020-02-19 11:13:05 +00:00
|
|
|
}
|
2020-03-01 09:23:10 +00:00
|
|
|
|
|
|
|
|