Update 'cv1/program.c'

This commit is contained in:
Michal Utľák 2024-02-21 13:24:35 +00:00
parent d20fa3242f
commit 454fa49d1c

View File

@ -1,5 +1,7 @@
#include <stdio.h> #include <stdio.h>
#define TAB_WIDTH 4
int main() { int main() {
int text; int text;
int lines_count = 0; int lines_count = 0;
@ -11,6 +13,11 @@ int main() {
text = text - 'A' + 'a'; text = text - 'A' + 'a';
} else if (text == '\n') { } else if (text == '\n') {
lines_count++; lines_count++;
} else if (text == '\t') {
for (int i = 0; i < TAB_WIDTH; i++) {
putchar(' ');
}
continue;
} else if (text < 32 || text == 127) { } else if (text < 32 || text == 127) {
continue; continue;
} }