fork(2) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. string str;
  6. getline(cin, str);
  7. for(int i = 0; i < str.length(); i++){
  8. if(str[i]>='0' && str[i]<'9'){
  9. str[i]++;
  10. }
  11. else if(str[i]=='9') str[i]='0';
  12. }
  13. cout << str;
  14. return 0;
  15. }
Success #stdin #stdout 0s 3460KB
stdin
abc1234567890ABC
stdout
abc2345678901ABC