public: string trans(string s, int n) { vector<string> res; string temp=""; s+=" "; for(char ch:s) { if(ch!=' ') ch=islower(ch) ? toupper(ch):tolower(ch); if(ch==' ') { res.push_back(temp); temp.clear(); } temp+=ch; } s.clear(); //reverse(res.begin(),res.end()); for(int i=res.size()-1;i>=0;...