Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace TriangleSymbol
- {
- internal class Program
- {
- static void Main(string[] args)
- {
- Console.OutputEncoding = Encoding.UTF8;
- char symbol;
- string name;
- int lineLegth;
- Console.WriteLine("Введите свое имя");
- name = Console.ReadLine();
- lineLegth = (name.Length) + 2;
- symbol = '%';
- for (int i=0; i < lineLegth; i++)
- {
- Console.Write(symbol);;
- }
- Console.WriteLine("\n" + symbol + name + symbol);
- for (int i = 0; i < lineLegth; i++)
- {
- Console.Write(symbol);
- }
- ;
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment