Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stdio.h>
- #include "string"
- using namespace std;
- int main()
- {
- string a;
- int i;
- cout << "Enter string: ";
- getline(cin, a);
- for (i = 0; a[i] != '\0'; i++)
- {
- if (a[i] == ';')
- {
- a[i] = a[i + 1]; i++;
- }
- cout << a[i];
- }
- cout << '\n';
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement