Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Test
- {
- class Program
- {
- static void Main(string[] args)
- {
- string userInput;
- char symbol;
- int quantitySymbols;
- Console.Write("Input some string: ");
- userInput = Console.ReadLine();
- quantitySymbols = Convert.ToInt32(userInput.Length);
- Console.Write("Input some char: ");
- symbol = Convert.ToChar(Console.ReadLine());
- for (int i = 0; i < quantitySymbols; i++)
- {
- Console.Write(symbol);
- if (i == userInput.Length + 1)
- {
- Console.WriteLine();
- Console.WriteLine($"{symbol}{userInput}{symbol}");
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment