Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp84
- {
- class Program
- {
- static void Main(string[] args)
- {
- string name;
- char symbol;
- Console.WriteLine("Ваше имя?");
- name = Console.ReadLine();
- Console.WriteLine("Укажите символ для обводки текста, например: %");
- symbol = Convert.ToChar(Console.ReadLine());
- for (int i = 0; i < 3; i++)
- {
- for (int j = 0; j < name.Length + 4; j++)
- {
- if (i != 1)
- {
- Console.Write(symbol);
- }
- else
- {
- Console.Write(symbol + " ");
- Console.BackgroundColor = ConsoleColor.Red;
- Console.Write(name);
- Console.BackgroundColor = ConsoleColor.Black;
- Console.Write(" " + symbol);
- break;
- }
- }
- Console.WriteLine();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement