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