fork download
  1. #include <iostream>
  2. #include <cmath>
  3. #include <cstdio>
  4. #include <vector>
  5. #include <algorithm>
  6. using namespace std;
  7.  
  8. int main() {
  9. string s;
  10. string k;
  11. int n;
  12. cin >> s;
  13. n = s.length();
  14. for(int i=0; i<n; i++){
  15. k = toupper(s[i]) + tolower(s[i])*i;
  16. }
  17. cout << k;
  18. return 0;
  19. }
Success #stdin #stdout 0s 15240KB
stdin
XyZ
stdout
N