diff --git a/cv1/program.c b/cv1/program.c index 47488bc..8e5a9e8 100644 --- a/cv1/program.c +++ b/cv1/program.c @@ -4,14 +4,18 @@ int main() { char c; + int counter=0; while ((c = getchar()) != EOF) { if(c<='z'&&c>='a'){ c=c+('A'-'a'); }else if(c<='Z'&&c>='A'){ c=c-('A'-'a'); } + if(c=='\n'){ + counter++; + } printf("%c",c); } - printf("\n"); + printf("\nLines count: %d",counter); return 0; }