Compare commits

...

2 Commits

Author SHA1 Message Date
efbdedcbd0 skuska 2024-02-21 14:11:24 +01:00
2ad0ce0f99 skuska 2024-02-21 14:11:07 +01:00

View File

@ -2,23 +2,30 @@
int main() { int main() {
int text; int text;
<<<<<<< HEAD
int lines_count = 0;
=======
>>>>>>> fc919bf24f3667c09c78a8a23ed365424347b363
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;
} }
<<<<<<< HEAD
=======
printf("hello world\n"); printf("hello world\n");
return 1; return 1;
>>>>>>> fc919bf24f3667c09c78a8a23ed365424347b363
putchar(text); putchar(text);
} }
printf("\nPocet riadkov: 1\n"); printf("\nLines count: %d\n", lines_count);
return 0; return 0;
} }