Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<cstring>
- #include <string.h>
- using namespace std;
- void secenek(char* str, const char c) {
- int i, j;
- int len = strlen(str);
- for (i = 0; i < len; i++)
- {
- if (str[i] == c)
- {
- for (j = 0; j < len; j++)
- {
- str[j] = str[i + 1];
- i++;
- len-j;
- }
- break;
- }
- }
- }
- int main()
- {
- char str1[250];
- cin.getline(str1, 250);
- char target;
- cin >> target;
- secenek(str1, target);
- cout << str1;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement