12 lines
228 B
C
12 lines
228 B
C
#include <stdio.h>
|
|
|
|
char simulate_caps_lock(char c) {
|
|
if ('a' <= c && c <= 'z') {
|
|
return c - ('a' - 'A');
|
|
} else if ('A' <= c && c <= 'Z') {
|
|
return c + ('a' - 'A');
|
|
} else {
|
|
return c;
|
|
}
|
|
}
|