public static int biggestword(string firstword, string secondword)
if (firstword.Length > secondword.Length)
else if (secondword.Length > firstword.Length)
else if (firstword.Length == secondword.Length)
public static string Incastratore(string firstword, string secondword)
if (biggestword(firstword, secondword) == 0)
for (int l = 0; l < firstword.Length; l++)
else if (biggestword(firstword, secondword) == 1)
for (int l = 0; l < secondword.Length; l++)
for (int l = secondword.Length; l < firstword.Length; l++)
else if (biggestword(firstword, secondword) == 2)
for (int l = 0; l < firstword.Length; l++)
for (int l = firstword.Length; l < secondword.Length; l++)
public static void Main()
string firstword, secondword;
Console.WriteLine("Inserire la prima parola");
firstword = Console.ReadLine();
Console.WriteLine("Inserire la seconda parola");
secondword = Console.ReadLine();
Console.WriteLine(Incastratore(firstword, secondword));