Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <fstream>
  2. #include<cstring>
  3.  
  4.  
  5. using namespace std;
  6.  
  7. short a[128],i;
  8.  
  9. int main()
  10. { int n;
  11. ifstream f("prosir.in");
  12. ofstream g("prosir.out");
  13. char s[300];
  14. f.getline(s,256);
  15. n=strlen(s);
  16. for(i='a';i<='z';i++)
  17. a[i]=1;
  18.  
  19. for(i=1;i<n;i++)
  20. {
  21. if(a[s[i-1]]==1&&a[s[i]]==0)
  22. s[i-1]='5';
  23. }
  24. g<<s;
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement