using System;
public class WriteUnderlined
{
public static void WriteUnder(string text)
{
int countSpaces = (80 - text.Length) / 2;
int i = 0;
for (; i < countSpaces; i++)
Console.Write(" ");
Console.WriteLine(text);
for (i = 0; i < countSpaces; i++)
Console.Write(" ");
for (i = 0; i < text.Length; i++)
Console.Write("_");
}
public static void Main()
{
WriteUnder("Hello");
}
}