Aktualizovat „du1/program.c“
This commit is contained in:
parent
88c7e516e5
commit
dd44de490b
@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user