This commit is contained in:
Michal Utľák 2024-02-21 14:11:07 +01:00
parent 0355e73121
commit 2ad0ce0f99

View File

@ -2,27 +2,22 @@
int main() { int main() {
int text; int text;
int lines_count = 0;
<<<<<<< HEAD
while ((text = getchar()) != EOF) { while ((text = getchar()) != EOF) {
if (text >= 'a' && text <= 'z') { if (text >= 'a' && text <= 'z') {
text = text - 'a' + 'A'; text = text - 'a' + 'A';
} else if (text >= 'A' && text <= 'Z') { } else if (text >= 'A' && text <= 'Z') {
text = text - 'A' + 'a'; text = text - 'A' + 'a';
} else if (text == '\n') { } else if (text == '\n') {
printf("\n"); lines_count++;
continue;
} else if (text < 32 || text == 127) { } else if (text < 32 || text == 127) {
continue; continue;
} }
=======
printf("hello world\n");
return 1;
>>>>>>> ae41227d7eccd9cfc8364f26b732c73f151b6d66
putchar(text); putchar(text);
} }
printf("\nPocet riadkov: 1\n"); printf("\nLines count: %d\n", lines_count);
return 0; return 0;
} }