skuska
This commit is contained in:
parent
61c826d6b4
commit
9cc5994194
@ -7,15 +7,13 @@ int main() {
|
||||
while ((ch = getchar()) != EOF) {
|
||||
if (ch == '\n') {
|
||||
line_count++;
|
||||
} else if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) {
|
||||
putchar((ch >= 'a' && ch <= 'z') ? (ch - 32) : (ch + 32));
|
||||
}
|
||||
|
||||
if (ch == '\n') {
|
||||
printf("\nLines count: %d\n", line_count);
|
||||
line_count = 0;
|
||||
putchar('\n');
|
||||
} else {
|
||||
putchar((ch >= 'a' && ch <= 'z') ? (ch - 32) : ((ch >= 'A' && ch <= 'Z') ? (ch + 32) : ch));
|
||||
}
|
||||
}
|
||||
|
||||
printf("\nLines count: %d\n", line_count);
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user