diff --git a/cv1/program.c b/cv1/program.c new file mode 100644 index 0000000..5a83bef --- /dev/null +++ b/cv1/program.c @@ -0,0 +1,11 @@ +#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; + } +}