Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp5
- {
- class Program
- {
- static void Main(string[] args)
- {
- string frameLine = "";
- Console.Write("Введите свое имя: ");
- string userName = Console.ReadLine();
- Console.Write("Введите символ рамки: ");
- string simbolFrame = Console.ReadLine();
- if (simbolFrame.Length == 1)
- {
- for(int x = 0; x < userName.Length + 2; x++)
- {
- frameLine += simbolFrame;
- }
- Console.WriteLine($"{frameLine}\n" +
- $"{simbolFrame}{userName}{simbolFrame}\n" +
- $"{frameLine}");
- }
- else
- {
- Console.WriteLine("Напишите один символ");
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement