Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void AB(char slowo[])
- {
- for(int i=0; i!='\0'; i++)
- {
- if(slowo[i]=='A')
- for(int j=99; j>slowo[i+1]; j--)
- slowo[j]=slowo[j+1];
- slowo[i+1]='B';
- }
- }
- int main()
- {
- char slowo[100]= {'A','A','A','A','C','C','C','A'};
- AB(slowo);
- cout<<slowo<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement