fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. string s = "Bo An Co";
  7. int n = s.length();
  8.  
  9. for(int i = 0; i < n; i++)
  10. if( s[i] != ' ')
  11. s[i] ^= ' ';
  12.  
  13. cout << s;
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 2872KB
stdin
Standard input is empty
stdout
bO aN cO