Bob103

C#_for_Nigga_(VII-2-№15)

Apr 19th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1. class Program
  2.     {
  3.         //GetLength(1)-столбцы
  4.  
  5.         static void Main(string[] args)
  6.         {
  7.           Console.WriteLine("Enter string:");
  8.             StringBuilder strB = new StringBuilder(Console.ReadLine());
  9.             byte[] CountCh = new byte[65536];
  10.  
  11.             for (int i = 0; i < strB.Length; i++)
  12.                 CountCh[strB[i]]++;
  13.  
  14.             char chMax = (char)Array.IndexOf(CountCh, CountCh.Max());
  15.             strB = strB.Replace(chMax.ToString(), "");
  16.             Console.WriteLine(strB);
  17.         }
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment