fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main() {
  6. string s = "ABCDEF";
  7. for(int i = 1; i < s.length(); i += 2)
  8. s[i - 1] = s[i] + 'a' - 'A';
  9. cout << s;
  10. return 0;
  11. }
Success #stdin #stdout 0s 5272KB
stdin
Standard input is empty
stdout
bBdDfF