Advertisement
Evgeniy175

Untitled

Dec 9th, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3. #include "string"
  4. using namespace std;
  5. int main()
  6. {
  7.     string a;
  8.     int i;
  9.     cout << "Enter string: ";
  10.     getline(cin, a);
  11.     for (i = 0; a[i] != '\0'; i++)
  12.     {
  13.         if (a[i] == ';')
  14.         {
  15.             a[i] = a[i + 1]; i++;
  16.         }
  17.         cout << a[i];
  18.     }
  19.     cout << '\n';
  20.     system("pause");
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement