diff --git a/du1/program.c b/du1/program.c index 185ba7c..1752121 100644 --- a/du1/program.c +++ b/du1/program.c @@ -2,9 +2,12 @@ int main(){ int c = 0; + int counter = 0; char a; while(1){ c = getchar(); + if(c == '\n') + counter++; if(c == EOF) break; if (c >= 'a' && c <= 'z') @@ -14,5 +17,6 @@ int main(){ a = c; putchar(a); } + printf("\nPočet riadkov: %d\n",counter); return 0; }