Aktualizovat „du1/program.c“
This commit is contained in:
parent
908c1cfdd0
commit
135d56b9db
@ -1,5 +1,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
int main(){
|
int main(){
|
||||||
|
char word;
|
||||||
|
|
||||||
char word;
|
char word;
|
||||||
|
|
||||||
for (int count = 0; (word = getchar()) != EOF;) {
|
for (int count = 0; (word = getchar()) != EOF;) {
|
||||||
@ -11,13 +13,15 @@ char word;
|
|||||||
}
|
}
|
||||||
if (word == '\n') {
|
if (word == '\n') {
|
||||||
count++;
|
count++;
|
||||||
for(int i =0;i<count;i++){
|
for (int i = 0; i <= count; i++) {
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
printf("Počet riadkov: %d", count);
|
printf("Počet riadkov: %d\n", count);
|
||||||
}
|
}
|
||||||
putchar(word);
|
putchar(word);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user