Created
February 4, 2025 16:02
-
-
Save DimaMitya/ca80ea627668bef435b5575cbf6f456d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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