SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 73 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top