using System.Collections.Generic;
using System.Threading.Tasks;
public static void Main()
Console.WriteLine(@"Program that takes as input two lists of names and removes from the first list all names given in
the second list. The input and output lists are given as words, separated by a space, each list at a separate line.");
Console.WriteLine("Give the first single line of names, separeted by a space:");
string firstLine = Console.ReadLine();
Console.WriteLine("Give the second single line of names, separeted by a space:");
string secondLine = Console.ReadLine();
string[] firstList = firstLine.Split(' ');
string[] secondList = secondLine.Split(' ');
string[] newList = new string[firstList.Length];
foreach (string word in firstList)
if (!secondList.Contains(word))
newList.SetValue(word, i);
Console.Write("The new list is: ");
foreach (string word in newList)
Console.Write(word + " ");