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 ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int symbolLength;
- int repeat;
- string name;
- string symbol;
- Console.WriteLine("Введите ваше имя:");
- name = Console.ReadLine();
- Console.WriteLine("Введите символ:");
- symbol = Console.ReadLine();
- symbolLength = name.Length;
- for (repeat = symbolLength + 4; repeat > 0; repeat--)
- {
- Console.Write(symbol);
- }
- Console.WriteLine($"\n{symbol} {name} {symbol}");
- for (repeat = symbolLength + 4; repeat > 0; repeat--)
- {
- Console.Write(symbol);
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment