29 lines
365 B
C
29 lines
365 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') {
|
|
count++;
|
|
}
|
|
putchar(word);
|
|
}
|
|
printf("\n\nPočet riadkov: %d", count);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|