Aktualizovat „du1/program.c“
This commit is contained in:
parent
908c1cfdd0
commit
135d56b9db
@ -2,6 +2,8 @@
|
|||||||
int main(){
|
int main(){
|
||||||
char word;
|
char word;
|
||||||
|
|
||||||
|
char word;
|
||||||
|
|
||||||
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;
|
||||||
@ -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