Aktualizovat „du1/program.c“

This commit is contained in:
Bohdan Yanchyk 2020-03-01 09:23:10 +00:00
parent 88c7e516e5
commit dd44de490b

View File

@ -1,9 +1,12 @@
#include <stdio.h>
int main(){
int main() {
char word;
int i = 0;
for (int count = 0; (word = getchar()) != EOF;) {
if (word >= 'a'&&word <= 'z') {
word -= 32;
@ -12,15 +15,18 @@ int main(){
word += 32;
}
if (word == '\n') {
while (word + i == '\n') {
count++;
for (int i = 0; i <= count; i++) {
printf("\n");
i++;
}
printf("Počet riadkov: %d", count);
i = 0;
printf("\nPočet riadkov: %d", count);
count = 0;
}
putchar(word);
}
return 0;
}