Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main(string[] args)
- {
- char symbol;
- string name;
- string midleLine;
- string frame = "";
- int stringLenght;
- Console.Write("Введите имя:");
- name = Console.ReadLine();
- Console.Write("Введите символ:");
- symbol = Convert.ToChar(Console.ReadLine());
- midleLine = symbol + name + symbol;
- stringLenght = midleLine.Length;
- for (int i = 0; i < stringLenght; i++)
- {
- frame += symbol;
- }
- Console.WriteLine($"{frame}\n{midleLine}\n{frame}");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement