Advertisement
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 DZ2
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Введите Ваше имя: ");
- string name = Console.ReadLine();
- Console.Write("Введите символ: ");
- char ch = Convert.ToChar(Console.ReadLine());
- Console.WriteLine("\nА теперь фокус!");
- name = ch + name + ch;
- int i= 0;
- while (i < name.Length)
- {
- Console.Write(ch);
- i++;
- }
- i = 0;
- Console.WriteLine("\n" + name);
- while (i < name.Length)
- {
- Console.Write(ch);
- i++;
- }
- Console.WriteLine("");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement