Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string.h>
- using namespace std;
- #define NMAX 103
- char s[NMAX];
- int main() {
- cin.getline(s, NMAX);
- int n = strlen(s);
- for (int i = 0; i < n; i++) {
- if (s[i] == '-') {
- strcpy(s + i, s + i + 1);
- }
- }
- cout << s << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement