fork(1) download
  1. #include <iostream>
  2. #include <string.h>
  3. using namespace std;
  4.  
  5. int main() {
  6. int n = 256;
  7. char a[n];
  8. cin.getline(a,n);
  9. for(int i = 0; i < strlen(a); i++){
  10. a[i]-='0';
  11. if (a[i]>=0 && a[i]<9){
  12. a[i]+=1;
  13. }
  14. else if(a[i]==9) a[i]=0;
  15. a[i]+='0';
  16. }
  17. for(int i=0;i<strlen(a);i++){
  18. cout << a[i];
  19. }
  20. return 0;
  21. }
Success #stdin #stdout 0s 3416KB
stdin
df123dfg
stdout
df234dfg