Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace C_sharp_Light
- {
- class Program
- {
- static void Main(string[] args)
- {
- string name;
- string frameChar;
- Console.Write("Выше имя - ");
- name = Console.ReadLine();
- Console.Write("Символ - ");
- frameChar = Console.ReadLine();
- int xOutput = 0;
- int yOutputStart = 8;
- int yOutputFinish = 11;
- if (frameChar.Length > 1)
- frameChar = frameChar.Substring(0, 1);
- for (int x = xOutput; x < name.Length+2; x++)
- {
- for (int y = yOutputStart; y < yOutputFinish; y++)
- {
- Console.SetCursorPosition(x, y);
- Console.Write(frameChar);
- }
- }
- Console.SetCursorPosition((xOutput+1), (yOutputStart + 1));
- Console.Write(name);
- Console.SetCursorPosition(xOutput, yOutputFinish); // Увод курсора с вывода.
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement