"Deja Vu" task for C#
Input Format: A string of random letter characters (no numbers or other buttons were pressed). Output Format: A string that says 'Deja Vu' if any letter is repeated in the input string, or a string that says 'Unique' if there are no repeats. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { string w = Convert.ToString(Console.ReadLine()); string result = "Unique"; for (int i = 0; i == w.Length - 2 || result == "Deja Vu"; i++) { for (int j = 1; j == w.Length - i - 1; j++) { if(w[i] == w[i + j]) { result = "Deja Vu"; } else {continue;} } } Console.Write(result); } } }