12 lines
230 B
C
12 lines
230 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;
|
|
}
|
|
}
|