public static string RepeatString(int times, string what)
for (int x = 0; x != times; x++)
public static string Square(int lato)
for (int floor = 1; floor <= lato; floor++)
square += RepeatString(floor, "*") + RepeatString(lato - floor, "-") + Environment.NewLine;
public static void Main()
Console.WriteLine("Inserire la misura del lato desiderata:");
answer = Convert.ToInt32(Console.ReadLine());
for (int n = 1; n <= answer; n++)
Console.WriteLine(Square(n));