View Code of Problem 55

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include<math.h>
void main() {
    char str[1000], c;
    gets(str);
    scanf("%c", &c);
    int len = strlen(str);
    for (int i = 0; i < len; i++) {
        if (str[i] == c) {
            for (int j = i; j < len; j++) {
                str[j] = str[j + 1];
                
            }
            i--;
        }
    }
    puts(str);
}

Double click to view unformatted code.


Back to problem 55