12345678910111213141516171819202122232425 |
- #include <stdio.h>
- #include <string.h>
- void del(char s[], int i, int num) {
- int len = strlen(s);
- int j;
- for (j = i-1; j < len - num; j++) {
- s[j] = s[j + num];
- }
- s[len - num] = '\0';
- }
- int main() {
- char s[50];
- scanf("%s", s);
- int i, num;
- scanf("%d %d", &i, &num);
- del(s, i, num);
- printf("%s\n", s);
- return 0;
- }
|