#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; } }