Advertisement
Guest User

Untitled

a guest
Jul 17th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. char stroka[50];
  8. int a=0;
  9. while (a!= 50){
  10. stroka[a]=0;
  11. a++;
  12. }
  13. a=0;
  14. int b=0;
  15. char mod_stroka[50];
  16. cin.getline(stroka, 50);
  17. while (a!=50){
  18. if (stroka[a]>='1'&&stroka[a]<='9'){
  19. while (b!=stroka[a]){
  20. mod_stroka[b]=stroka[a+1];
  21. b++;
  22. }
  23. }
  24. else{
  25. mod_stroka[b+1]=stroka[a];
  26. }
  27. a++;
  28. }
  29. cout <<mod_stroka;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement