Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace HW_2025
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- string userSymbol = "";
- string userName = "";
- int borderedNameLines = 3;
- int userNameLines = 2;
- Console.WriteLine("Введите сивол для обводки имени?");
- userSymbol = Console.ReadLine();
- Console.WriteLine("Введите ваше имя");
- userName = Console.ReadLine();
- for(int i = 1; i <= borderedNameLines; i++)
- {
- if (i == userNameLines)
- {
- Console.Write($"\n{userSymbol}");
- Console.Write(userName);
- Console.WriteLine(userSymbol);
- }
- else
- {
- for (int j = 0; j < userName.Length + userNameLines; j++)
- {
- Console.Write(userSymbol);
- }
- }
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement