123456789101112131415161718192021 |
- #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 + num < len; j++) {
- s[j] = s[j + num];
- }
- s[len - num] = '\0';
- }
- int main() {
- char s[51];
- int i, num;
- scanf("%s", s);
- scanf("%d %d", &i, &num);
- del(s, i, num);
- printf("%s\n", s);
- return 0;
- }
|