diff --git a/cv1/program.c b/cv1/program.c index 17cef6b..1c8d542 100644 --- a/cv1/program.c +++ b/cv1/program.c @@ -5,27 +5,29 @@ int main() { int lines_count = 0; while ((c = getchar()) != EOF) { - + if (c >= 'a' && c <= 'z') { - + c = c - 'a' + 'A'; } - + else if (c >= 'A' && c <= 'Z') { - + c = c - 'A' + 'a'; } - + else if (c == '\n') { - + lines_count++; + + putchar('\n'); } putchar(c); } - printf("\nLines Count: %d\n", lines_count); + printf("Lines count: %d\n", lines_count); return 0; }