Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- char stroka[50];
- int a=0;
- while (a!= 50){
- stroka[a]=0;
- a++;
- }
- a=0;
- int b=0;
- char mod_stroka[50];
- cin.getline(stroka, 50);
- while (a!=50){
- if (stroka[a]>='1'&&stroka[a]<='9'){
- while (b!=stroka[a]){
- mod_stroka[b]=stroka[a+1];
- b++;
- }
- }
- else{
- mod_stroka[b+1]=stroka[a];
- }
- a++;
- }
- cout <<mod_stroka;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement