Skip to content

Instantly share code, notes, and snippets.

@eu9ene9
Created February 6, 2025 19:01
Show Gist options
  • Save eu9ene9/739928de327afb26bf049feebb12c80f to your computer and use it in GitHub Desktop.
Save eu9ene9/739928de327afb26bf049feebb12c80f to your computer and use it in GitHub Desktop.
ДЗ: Вывод имени
using System.Text;
internal class Program
{
private static void Main(string[] args)
{
string userName;
string symbol;
Console.Write("Ввежите ваше имя: ");
userName = Console.ReadLine();
Console.Write("Введите символ: ");
symbol = Console.ReadLine();
for (int i = 0; i < userName.Length + 3; i++)
{
if(userName.Length != i)
{
Console.Write($"{symbol}");
}
}
Console.WriteLine("");
Console.WriteLine($"{symbol}{userName}{symbol}");
for (int i = 0; i < userName.Length + 3; i++)
{
if (userName.Length != i)
{
Console.Write($"{symbol}");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment