Skip to content

Instantly share code, notes, and snippets.

@DimaMitya
Created February 4, 2025 16:02
Show Gist options
  • Save DimaMitya/ca80ea627668bef435b5575cbf6f456d to your computer and use it in GitHub Desktop.
Save DimaMitya/ca80ea627668bef435b5575cbf6f456d to your computer and use it in GitHub Desktop.
using System;
namespace triton
{
internal class Program
{
private static void Main(string[] args)
{
string userInput;
string symbol;
string name;
Console.Write("Введите символ из которого будет сделан прямоугольник: ");
userInput = Console.ReadLine();
symbol = userInput;
Console.Write("Введите ваше имя: ");
name = Console.ReadLine();
Console.Clear();
for (int i = 0; i <= name.Length; i++)
{
userInput += symbol;
Console.SetCursorPosition(0, 0);
Console.Write(userInput);
Console.WriteLine($"\n{symbol}{name}{symbol}");
Console.SetCursorPosition(0, 2);
Console.Write(userInput);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment