class Solution { public: string trans(string s, int n) { for (int i = 0 ; i < n; ++i) { if (s[i] != ' ') { int b = i, e = i; while (s[e] != ' ' && e < n) { s[e] = islower(s[e]) ? toupper(s[e]) : tolower(s[e]); ...