pvjc24/cv1/program.c

12 lines
230 B
C
Raw Normal View History

2024-02-23 12:58:04 +00:00
#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;
}
}