Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp
- {
- class Program
- {
- static void Main(string[] args)
- {
- char sumbol;
- string stringWithLetters = "";
- string stringWithName;
- string name;
- string space = " ";
- Console.WriteLine("Введите свое имя:");
- name = Console.ReadLine();
- Console.WriteLine("Укажите какой-бы символ вам хотелось?");
- sumbol = Convert.ToChar(Console.ReadLine());
- stringWithName = sumbol + space + name + space + sumbol;
- for (int i = 0; i < stringWithName.Length; i++)
- {
- stringWithLetters += sumbol;
- }
- Console.WriteLine(stringWithLetters);
- Console.WriteLine(stringWithName);
- Console.WriteLine(stringWithLetters);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement