View Code of Problem 55

import java.util.*;
public class Main{
	public static void main(String[] args)
	{
	 Scanner sc = new Scanner(System.in);
	 String str1 = sc.nextLine();
	 String str2 = sc.nextLine();
	 for (int i = 0; i < str1.length(); i++) {
		if (str1.charAt(i)!=str2.charAt(0)) {
			System.out.print(str1.charAt(i));
		}
	 }
	}
}

Double click to view unformatted code.


Back to problem 55