Aktualizovat „du1/program.c“
This commit is contained in:
parent
88c7e516e5
commit
dd44de490b
@ -1,9 +1,12 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
int main(){
|
|
||||||
|
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
|
||||||
|
|
||||||
char word;
|
char word;
|
||||||
|
int i = 0;
|
||||||
for (int count = 0; (word = getchar()) != EOF;) {
|
for (int count = 0; (word = getchar()) != EOF;) {
|
||||||
if (word >= 'a'&&word <= 'z') {
|
if (word >= 'a'&&word <= 'z') {
|
||||||
word -= 32;
|
word -= 32;
|
||||||
@ -12,15 +15,18 @@ int main(){
|
|||||||
word += 32;
|
word += 32;
|
||||||
}
|
}
|
||||||
if (word == '\n') {
|
if (word == '\n') {
|
||||||
|
while (word + i == '\n') {
|
||||||
count++;
|
count++;
|
||||||
for (int i = 0; i <= count; i++) {
|
i++;
|
||||||
printf("\n");
|
|
||||||
}
|
}
|
||||||
printf("Počet riadkov: %d", count);
|
i = 0;
|
||||||
|
printf("\nPočet riadkov: %d", count);
|
||||||
|
count = 0;
|
||||||
}
|
}
|
||||||
putchar(word);
|
putchar(word);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user