Merge branch 'master' of git.kemt.fei.tuke.sk:mu590ku/pvjc24
This commit is contained in:
commit
291e3d923e
@ -5,19 +5,22 @@ int main() {
|
||||
int lines_count = 0;
|
||||
|
||||
while ((text = getchar()) != EOF) {
|
||||
if (text >= 'a' && text <= 'z') {
|
||||
text = text - 'a' + 'A';
|
||||
} else if (text >= 'A' && text <= 'Z') {
|
||||
text = text - 'A' + 'a';
|
||||
} else if (text == '\n') {
|
||||
if (text == '\n') {
|
||||
putchar('\n');
|
||||
lines_count++;
|
||||
} else if (text < 32 || text == 127) {
|
||||
} else if (text == '\t') {
|
||||
putchar('\t');
|
||||
continue;
|
||||
} else if ((text >= 'a' && text <= 'z') || (text >= 'A' && text <= 'Z')) {
|
||||
putchar(text ^ ' ');
|
||||
} else if ((text >= 32 && text < 127) || text == 9) {
|
||||
putchar(text);
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
|
||||
putchar(text);
|
||||
}
|
||||
|
||||
printf("\nLines count: %d\n", lines_count);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user