capslock
This commit is contained in:
parent
a03d606ef9
commit
f9d3999ac7
@ -6,15 +6,12 @@ int main() {
|
||||
|
||||
while ((c = getchar()) != EOF) {
|
||||
if (c >= 'a' && c <= 'z') {
|
||||
|
||||
c = c - 'a' + 'A';
|
||||
} else if (c >= 'A' && c <= 'Z') {
|
||||
|
||||
c = c - 'A' + 'a';
|
||||
}
|
||||
|
||||
if (c == '\n') {
|
||||
|
||||
lineCount++;
|
||||
}
|
||||
|
||||
@ -23,7 +20,7 @@ int main() {
|
||||
}
|
||||
|
||||
|
||||
printf("Lines␣count: %d\n", lineCount);
|
||||
printf("\nLines␣count: %d\n", lineCount);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user