Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string str = "Hello guys!";
- Console.WriteLine(str);
- Console.WriteLine("nWhat we want to do with this string?");
- Console.WriteLine("nInsert - 0; nRemove - 1; nReaplace - 2; nContains - 3; nExit - 4;n"); // выбор действия со строкой.
- int e = Convert.ToInt32(Console.ReadLine());
- if (e == 0)
- {
- Console.WriteLine("Enter the number of latter: "); // место, в которое нужно вставить символы
- int i = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Enter the letter , that we want to insert: "); // символ/ы который/ые вставляем
- string str1 = Console.ReadLine();
- Console.WriteLine(str.Insert(i, "" + str1 + ""));
- }
- int e;
- string str = "Hello gues!";
- Console.WriteLine(str);
- do
- {
- Console.WriteLine("nWhat we want to do with this string?");
- Console.WriteLine("nInsert - 0; nRemove - 1; nReaplace - 2; nContains - 3; nExit - 4;n"); // выбор действия со строкой.
- e = Convert.ToInt32(Console.ReadLine());
- if (e == 0)
- {
- Console.WriteLine("Enter the position of latter: "); // место, в которое нужно вставить символы
- int i = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine("Enter the letter , that we want to insert: "); // символ/ы который/ые вставляем
- string str1 = Console.ReadLine();
- Console.WriteLine(str.Insert(i, "" + str1 + ""));
- }
- } while (e != 4); // т.к 4 у вас условие выхода
Add Comment
Please, Sign In to add comment