View Code of Problem 55

#include<iostream>
#include<cmath>
#include<cstdio>
#include <cstring>
using namespace std;

int main() {
	char s1[100];
	gets_s(s1);
	char a;
	a=getchar();
	int n;
	n = strlen(s1);
	for (int i = 0; i < n; i++) {
		if (s1[i] != a) {
			cout<<s1[i];
		}
	}
	return 0;
}

/*
Main.cc: In function 'int main()':
Main.cc:9:11: error: 'gets_s' was not declared in this scope
  gets_s(s1);
           ^
*/

Double click to view unformatted code.


Back to problem 55