Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.86 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication6
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Console.ForegroundColor = ConsoleColor.Yellow;
  14.             Console.WriteLine("Введите текст:");
  15.             string Text = Console.ReadLine();
  16.             Console.WriteLine("Какой символ (один) заменить?");
  17.             char replacement_it = char.Parse(Console.ReadLine());
  18.             Console.WriteLine("На что его заменить?");
  19.             string replacement_on_it = Console.ReadLine();
  20.             string[] Words = Text.Split(replacement_it);
  21.             string Text_new = string.Join(replacement_on_it, Words);
  22.             Console.WriteLine(Text_new);
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement