diff --git a/cv1/program.c b/cv1/program.c index 137c79e..1e8d2d8 100644 --- a/cv1/program.c +++ b/cv1/program.c @@ -1,5 +1,7 @@ #include +#define TAB_WIDTH 4 + int main() { int text; int lines_count = 0; @@ -11,6 +13,11 @@ int main() { text = text - 'A' + 'a'; } else if (text == '\n') { lines_count++; + } else if (text == '\t') { + for (int i = 0; i < TAB_WIDTH; i++) { + putchar(' '); + } + continue; } else if (text < 32 || text == 127) { continue; } @@ -20,4 +27,4 @@ int main() { printf("\nLines count: %d\n", lines_count); return 0; -} +} \ No newline at end of file