Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Text;
- namespace Вывод_имени
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Введите имя: ");
- string name = Console.ReadLine();
- Console.Write("Введите символ: ");
- char symbol = Convert.ToChar(Console.ReadLine());
- StringBuilder upDownFrame = new();
- string nameInSymbols = $"{symbol}{name}{symbol}";
- int nameLenght = nameInSymbols.Length;
- for (int i = 0; i < nameInSymbols.Length; i++)
- upDownFrame.Append(symbol);
- Console.WriteLine(upDownFrame);
- Console.WriteLine($"{nameInSymbols}");
- Console.WriteLine(upDownFrame);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement